projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fuzz/asn1.c: Add check for ASN1_item_i2d
[openssl.git]
/
fuzz
/
asn1.c
diff --git
a/fuzz/asn1.c
b/fuzz/asn1.c
index 69978cd05436641998c14bb694a71e43236a8427..ee602a08a3d91230c05ed32340b074d668f5a13f 100644
(file)
--- a/
fuzz/asn1.c
+++ b/
fuzz/asn1.c
@@
-317,8
+317,9
@@
int FuzzerTestOneInput(const uint8_t *buf, size_t len)
ASN1_item_print(bio, o, 4, i, pctx);
BIO_free(bio);
}
- ASN1_item_i2d(o, &der, i);
- OPENSSL_free(der);
+ if (ASN1_item_i2d(o, &der, i) > 0) {
+ OPENSSL_free(der);
+ }
ASN1_item_free(o, i);
}
}