Merge pull request #299 from guerital/tag-zero-fix

Check if tag is equal to 0
This commit is contained in:
Robert Edmonds 2019-05-18 18:06:19 -04:00 committed by GitHub
commit d712e0c52d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2072,6 +2072,11 @@ parse_tag_and_wiretype(size_t len,
unsigned shift = 4;
unsigned rv;
/* 0 is not a valid tag value */
if ((data[0] & 0xf8) == 0) {
return 0;
}
*wiretype_out = data[0] & 7;
if ((data[0] & 0x80) == 0) {
*tag_out = tag;