Fix malloc define typo
authorMike Frysinger <vapier@gentoo.org>
Sat, 21 Mar 2015 09:08:41 +0000 (05:08 -0400)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Mar 2015 11:35:46 +0000 (11:35 +0000)
Fix compilation failure when SCTP is compiled due to incorrect define.

Reported-by: Conrad Kostecki <ck+gentoobugzilla@bl4ckb0x.de>
URL: https://bugs.gentoo.org/543828

RT#3758
Signed-off-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 7c82e339a677f8546e1456c7a8f6788598a9de43)

crypto/bio/bss_dgram.c

index b495db26e142fc4dc2ec8187c0b1c8ec1e811678..2e78fd1e960a11b49204cf8dd49a36ce504cd073 100644 (file)
@@ -1293,7 +1293,7 @@ static int dgram_sctp_read(BIO *b, char *out, int outl)
                 (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
             authchunks = OPENSSL_malloc(optlen);
             if (!authchunks) {
                 (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
             authchunks = OPENSSL_malloc(optlen);
             if (!authchunks) {
-                BIOerr(BIO_F_DGRAM_SCTP_READ, ERR_R_MALLOC_ERROR);
+                BIOerr(BIO_F_DGRAM_SCTP_READ, ERR_R_MALLOC_FAILURE);
                 return -1;
             }
             memset(authchunks, 0, sizeof(optlen));
                 return -1;
             }
             memset(authchunks, 0, sizeof(optlen));
@@ -1365,7 +1365,7 @@ static int dgram_sctp_write(BIO *b, const char *in, int inl)
         char *tmp;
         data->saved_message.bio = b;
         if(!(tmp = OPENSSL_malloc(inl))) {
         char *tmp;
         data->saved_message.bio = b;
         if(!(tmp = OPENSSL_malloc(inl))) {
-            BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_ERROR);
+            BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_FAILURE);
             return -1;
         }
         if (data->saved_message.data)
             return -1;
         }
         if (data->saved_message.data)