cvs: php4 /sapi/thttpd thttpd.c

From: Date: Wed, 02 May 2001 22:53:41 +0000
Subject: cvs: php4 /sapi/thttpd thttpd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5478@lists.php.net to get a copy of this message
andi Wed May 2 15:53:41 2001 EDT Modified files: /php4/sapi/thttpd thttpd.c Log: - Another strncpy() -> strlcpy() change Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.41 php4/sapi/thttpd/thttpd.c:1.42 --- php4/sapi/thttpd/thttpd.c:1.41 Tue Apr 24 23:42:24 2001 +++ php4/sapi/thttpd/thttpd.c Wed May 2 15:53:41 2001 @@ -174,9 +174,7 @@ php_register_variable("REQUEST_URI", SG(request_info).request_uri, track_vars_array ELS_CC PLS_CC); php_register_variable("PATH_TRANSLATED", SG(request_info).path_translated, track_vars_array ELS_CC PLS_CC); - buf[BUF_SIZE] = '\0'; - - strncpy(buf, inet_ntoa(TG(hc)->client_addr.sa_in.sin_addr), BUF_SIZE); + strlcpy(buf, inet_ntoa(TG(hc)->client_addr.sa_in.sin_addr), sizeof(buf)); ADD_STRING("REMOTE_ADDR"); ADD_STRING("REMOTE_HOST");

« previous php.cvs (#5478) next »