Fix some possibly uninitialized variables in stk500v2_display()

Submitted by Adrian Klieber
patch #9820: Fix some out-of-bounds/uninitialized issues



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1441 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2020-09-16 21:19:50 +00:00
parent 34a1c8394c
commit 4278300d8e
1 changed files with 3 additions and 2 deletions

View File

@ -3158,8 +3158,9 @@ static const char *stk600_get_cardname(const struct carddata *table,
static void stk500v2_display(PROGRAMMER * pgm, const char * p)
{
unsigned char maj, min, hdw, topcard, maj_s1, min_s1, maj_s2, min_s2;
unsigned int rev;
unsigned char maj = 0, min = 0, hdw = 0, topcard = 0,
maj_s1 = 0, min_s1 = 0, maj_s2 = 0, min_s2 = 0;
unsigned int rev = 0;
const char *topcard_name, *pgmname;
switch (PDATA(pgm)->pgmtype) {