Skip to content

Commit

Permalink
PR comments; additional size check
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed May 31, 2024
1 parent 4a5be1e commit 3f37c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/asn1/a_dup.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *input) {
// Size and allocate |buf|.
unsigned char *buf = NULL;
int buf_len = i2d(input, &buf);
if (buf == NULL) {
if (buf == NULL || buf_len < 0) {
return NULL;
}

Expand Down

0 comments on commit 3f37c6f

Please sign in to comment.