Skip to content

Commit 64d1153

Browse files
authored
Merge pull request #508 from werew/develop
Fixes #507
2 parents 734ba7e + 25c26a3 commit 64d1153

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pk/asn1/der/utf8/der_decode_utf8_string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int der_decode_utf8_string(const unsigned char *in, unsigned long inlen,
6565
/* count number of bytes */
6666
for (z = 0; (tmp & 0x80) && (z <= 4); z++, tmp = (tmp << 1) & 0xFF);
6767

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

0 commit comments

Comments
 (0)