SimpleTLV: Skip correctly two bytes after reading 2b size (#1231)

This commit is contained in:
Jakub Jelen 2018-01-17 00:28:05 +01:00 committed by Frank Morgner
parent 74e7200c31
commit 9b2023c7ae
1 changed files with 2 additions and 1 deletions

View File

@ -90,8 +90,9 @@ sc_simpletlv_read_tag(u8 **buf, size_t buflen, u8 *tag_out, size_t *taglen)
*taglen = 0;
return SC_ERROR_INVALID_ARGUMENTS;
}
/* skip two bytes (the size) */
len = lebytes2ushort(p);
p++;
p+=2;
}
*taglen = len;
*buf = p;