Skip to content

Commit af7d233

Browse files
authored
Merge pull request #3352 from AlxCzl/fix-mad-null-deref
Fix NULL dereference in MAD print_aid_description
2 parents c46b72e + 2c27d4f commit af7d233

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

client/src/mifare/mad.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ static int print_aid_description(json_t *root, uint16_t aid, char *fmt, bool ver
117117
continue;
118118
}
119119
const char *fmad = mad_json_get_str(data, "mad");
120+
if (fmad == NULL)
121+
continue;
120122
char lfmad[strlen(fmad) + 1];
121123
strcpy(lfmad, fmad);
122124
str_lower(lfmad);

0 commit comments

Comments
 (0)