Skip to content

Commit 5043967

Browse files
authored
Merge pull request #401 from libtom/pr/fix-der_length_custom_type
fix der_length_custom_type - incorrect length of length
2 parents a8d0442 + ac1622e commit 5043967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pk/asn1/der/custom_type/der_length_custom_type.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ int der_length_custom_type(const ltc_asn1_list *root, unsigned long *outlen, uns
190190
}
191191
} else {
192192
/* calc length of length */
193-
if ((err = der_length_asn1_length(y, &x)) != CRYPT_OK) {
193+
if ((err = der_length_asn1_length(y - id_len, &x)) != CRYPT_OK) {
194194
goto LBL_ERR;
195195
}
196196
if (payloadlen != NULL) {

0 commit comments

Comments
 (0)