httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From taka...@apache.org
Subject svn commit: r727777 - /httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c
Date Thu, 18 Dec 2008 17:51:18 GMT
Author: takashi
Date: Thu Dec 18 09:51:18 2008
New Revision: 727777

URL: http://svn.apache.org/viewvc?rev=727777&view=rev
Log:
Use apr_cpystrn instead of strncpy since strncpy can create an unterminated string.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c?rev=727777&r1=727776&r2=727777&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c Thu Dec 18 09:51:18 2008
@@ -104,7 +104,7 @@
     }
 
     sa.sun_family = AF_UNIX;
-    strncpy(sa.sun_path, path, sizeof(sa.sun_path));
+    apr_cpystrn(sa.sun_path, path, sizeof(sa.sun_path));
 
     rv = socket_connect_un(s, &sa);
     if (rv) {



Mime
View raw message