httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1327046 - /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c
Date Tue, 17 Apr 2012 11:21:22 GMT
Author: trawick
Date: Tue Apr 17 11:21:22 2012
New Revision: 1327046

URL: http://svn.apache.org/viewvc?rev=1327046&view=rev
Log:
make clang analyzer happier by confirming that wargv[0] isn't NULL
before passing it to strlen()

(all code inside AP_DEBUG_ASSERT())

Modified:
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c?rev=1327046&r1=1327045&r2=1327046&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c Tue Apr 17 11:21:22 2012
@@ -249,6 +249,7 @@ apr_status_t proc_spawn_process(const ch
                 sizeof(procnode->socket_path));
 
     /* truncation already checked for in handler or FcgidWrapper parser */
+    AP_DEBUG_ASSERT(wargv[0] != NULL);
     AP_DEBUG_ASSERT(strlen(wargv[0]) < sizeof(procnode->executable_path));
     apr_cpystrn(procnode->executable_path, wargv[0],
                 sizeof(procnode->executable_path));



Mime
View raw message