fixed AFL

This commit is contained in:
merlokk 2017-11-13 13:19:05 +02:00
commit ae616398b4

View file

@ -475,12 +475,14 @@ static void emv_tag_dump_cvm_list(const struct tlv *tlv, const struct emv_tag *t
static void emv_tag_dump_afl(const struct tlv *tlv, const struct emv_tag *tag, FILE *f, int level){ static void emv_tag_dump_afl(const struct tlv *tlv, const struct emv_tag *tag, FILE *f, int level){
if (tlv->len < 4 || tlv->len % 4) { if (tlv->len < 4 || tlv->len % 4) {
PRINT_INDENT(level);
fprintf(f, "\tINVALID!\n"); fprintf(f, "\tINVALID!\n");
return; return;
} }
for (int i = 0; i < tlv->len / 4; i++) { for (int i = 0; i < tlv->len / 4; i++) {
fprintf(f, "\tSFI[%02x] start:%02x end:%02x offline:%02x\n", tlv->value[i * 4 + 0] >> 3, tlv->value[i * 4 + 1], tlv->value[i * 4 + 2], tlv->value[i * 4 + 3]); PRINT_INDENT(level);
fprintf(f, "SFI[%02x] start:%02x end:%02x offline:%02x\n", tlv->value[i * 4 + 0] >> 3, tlv->value[i * 4 + 1], tlv->value[i * 4 + 2], tlv->value[i * 4 + 3]);
} }
} }