We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 734ba7e + 25c26a3 commit 64d1153Copy full SHA for 64d1153
src/pk/asn1/der/utf8/der_decode_utf8_string.c
@@ -65,7 +65,7 @@ int der_decode_utf8_string(const unsigned char *in, unsigned long inlen,
65
/* count number of bytes */
66
for (z = 0; (tmp & 0x80) && (z <= 4); z++, tmp = (tmp << 1) & 0xFF);
67
68
- if (z > 4 || (x + (z - 1) > inlen)) {
+ if (z == 1 || z > 4 || (x + (z - 1) > inlen)) {
69
return CRYPT_INVALID_PACKET;
70
}
71
0 commit comments