Skip to content

Commit

Permalink
Merge 25c26a3 into 734ba7e
Browse files Browse the repository at this point in the history
  • Loading branch information
werew committed Oct 3, 2019
2 parents 734ba7e + 25c26a3 commit b3ef035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pk/asn1/der/utf8/der_decode_utf8_string.c
Expand Up @@ -65,7 +65,7 @@ int der_decode_utf8_string(const unsigned char *in, unsigned long inlen,
/* count number of bytes */
for (z = 0; (tmp & 0x80) && (z <= 4); z++, tmp = (tmp << 1) & 0xFF);

if (z > 4 || (x + (z - 1) > inlen)) {
if (z == 1 || z > 4 || (x + (z - 1) > inlen)) {
return CRYPT_INVALID_PACKET;
}

Expand Down

0 comments on commit b3ef035

Please sign in to comment.