httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r656400 - /httpd/httpd/trunk/support/ab.c
Date Wed, 14 May 2008 20:08:45 GMT
Author: rpluem
Date: Wed May 14 13:08:45 2008
New Revision: 656400

URL: http://svn.apache.org/viewvc?rev=656400&view=rev
Log:
* Check for failure of apr_file_info_get call

Modified:
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=656400&r1=656399&r2=656400&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Wed May 14 13:08:45 2008
@@ -1945,7 +1945,12 @@
         return rv;
     }
 
-    apr_file_info_get(&finfo, APR_FINFO_NORM, postfd);
+    rv = apr_file_info_get(&finfo, APR_FINFO_NORM, postfd);
+    if (rv != APR_SUCCESS) {
+        fprintf(stderr, "ab: Could not stat POST data file (%s): %s\n", pfile,
+                apr_strerror(rv, errmsg, sizeof errmsg));
+        return rv;
+    }
     postlen = (apr_size_t)finfo.size;
     postdata = malloc(postlen);
     if (!postdata) {



Mime
View raw message