diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_set.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_set.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_set.c b/src/lib/libcrypto/asn1/a_set.c index 3aeb7e54ff..8101f7722d 100644 --- a/src/lib/libcrypto/asn1/a_set.c +++ b/src/lib/libcrypto/asn1/a_set.c | |||
@@ -121,7 +121,7 @@ i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp, i2d_of_void *i2d, | |||
121 | 121 | ||
122 | pStart = p; /* Catch the beg of Setblobs*/ | 122 | pStart = p; /* Catch the beg of Setblobs*/ |
123 | /* In this array we will store the SET blobs */ | 123 | /* In this array we will store the SET blobs */ |
124 | rgSetBlob = malloc(sk_OPENSSL_BLOCK_num(a) * sizeof(MYBLOB)); | 124 | rgSetBlob = reallocarray(NULL, sk_OPENSSL_BLOCK_num(a), sizeof(MYBLOB)); |
125 | if (rgSetBlob == NULL) { | 125 | if (rgSetBlob == NULL) { |
126 | ASN1err(ASN1_F_I2D_ASN1_SET, ERR_R_MALLOC_FAILURE); | 126 | ASN1err(ASN1_F_I2D_ASN1_SET, ERR_R_MALLOC_FAILURE); |
127 | return 0; | 127 | return 0; |