From: Emilia Kasper Date: Wed, 4 Mar 2015 21:05:53 +0000 (-0800) Subject: Harmonize return values in dtls1_buffer_record X-Git-Tag: OpenSSL_1_1_0-pre1~1564 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=06c6a2b4a3a6e64303caa256398dd2dc16f9c35a;p=oweals%2Fopenssl.git Harmonize return values in dtls1_buffer_record Ensure all malloc failures return -1. Reported by Adam Langley (Google). Reviewed-by: Matt Caswell --- diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index b1d9156de7..4dbd694442 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -231,7 +231,7 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority) pitem_free(item); SSLerr(SSL_F_DTLS1_BUFFER_RECORD, ERR_R_INTERNAL_ERROR); - return (0); + return -1; } rdata->packet = s->packet;