From: Brian Pane Date: Sun, 27 Jan 2002 06:38:25 +0000 (+0000) Subject: Fixed segfault in "-i" mode of ab X-Git-Tag: 2.0.31~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cfef29a33c313588905a01e02d52a2bc8d74a5c;p=apache Fixed segfault in "-i" mode of ab git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93043 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 0322d17957..bd84d0c4b2 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1146,7 +1146,7 @@ static void test(void) apr_poll_setup(&readbits, concurrency, cntxt); /* setup request */ - if (!posting) { + if (posting <= 0) { sprintf(request, "%s %s HTTP/1.0\r\n" "User-Agent: ApacheBench/%s\r\n" "%s" "%s" "%s" @@ -1185,7 +1185,7 @@ static void test(void) /* * Combine headers and (optional) post file into one contineous buffer */ - if (posting) { + if (posting == 1) { char *buff = (char *) malloc(postlen + reqlen + 1); strcpy(buff, request); strcpy(buff + reqlen, postdata); @@ -1302,14 +1302,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.86 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AP_SERVER_BASEREVISION " <$Revision: 1.87 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_SERVER_BASEREVISION, "$Revision: 1.86 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_SERVER_BASEREVISION, "$Revision: 1.87 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-2001 The Apache Software Foundation, http://www.apache.org/
\n"); printf("

\n

\n");