httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/support ab.c
Date Thu, 03 Jul 2003 16:07:21 GMT
nd          2003/07/03 09:07:21

  Modified:    support  ab.c
  Log:
  catch out of memory condition (ID 29 of reasoning report)
  
  Revision  Changes    Path
  1.125     +7 -3      httpd-2.0/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/ab.c,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- ab.c	29 Jun 2003 17:41:56 -0000	1.124
  +++ ab.c	3 Jul 2003 16:07:21 -0000	1.125
  @@ -1642,7 +1642,11 @@
        * Combine headers and (optional) post file into one contineous buffer
        */
       if (posting == 1) {
  -	char *buff = (char *) malloc(postlen + reqlen + 1);
  +	char *buff = malloc(postlen + reqlen + 1);
  +        if (!buff) {
  +            fprintf(stderr, "error creating request buffer: out of memory\n");
  +            return;
  +        }
   	strcpy(buff, request);
   	strcpy(buff + reqlen, postdata);
   	request = buff;
  
  
  

Mime
View raw message