From: Christophe Jaillet Date: Sat, 1 Jun 2013 08:43:12 +0000 (+0000) Subject: Check if malloc succeeded X-Git-Tag: 2.5.0-alpha~5391 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10bcdb2c1210595bf3fd747d4de8a0e745a48ca9;p=apache Check if malloc succeeded PR54344 [Bill Parker, wp02855 gmail com] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1488492 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 3ed1febb73..5fb6bf81c2 100644 --- a/support/ab.c +++ b/support/ab.c @@ -627,6 +627,10 @@ static void ssl_proceed_handshake(struct connection *c) pk_bits = 0; /* Anon DH */ ssl_info = malloc(128); + if (ssl_info == NULL) { + fprintf(stderr, "ab: Could not allocate ssl_info data buffer\n"); + return; + } apr_snprintf(ssl_info, 128, "%s,%s,%d,%d", SSL_get_version(c->ssl), SSL_CIPHER_get_name(ci),