cvs: php4 /ext/curl curl.c

From: Date: Wed, 02 May 2001 22:22:17 +0000
Subject: cvs: php4 /ext/curl curl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5473@lists.php.net to get a copy of this message
andi Wed May 2 15:22:17 2001 EDT Modified files: /php4/ext/curl curl.c Log: - Fix possible buffer overflow. Always better to use strlcpy() instead of strncpy() Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.48 php4/ext/curl/curl.c:1.49 --- php4/ext/curl/curl.c:1.48 Mon Apr 30 09:30:46 2001 +++ php4/ext/curl/curl.c Wed May 2 15:22:16 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: curl.c,v 1.48 2001/04/30 16:30:46 sterling Exp $ */ +/* $Id: curl.c,v 1.49 2001/05/02 22:22:16 andi Exp $ */ #include "php.h" @@ -444,7 +444,7 @@ return -1; } - strncpy(buf, Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + strlcpy(buf, Z_STRVAL_P(retval), buflen); zval_ptr_dtor(&argv[0]); zval_ptr_dtor(&argv[1]);

« previous php.cvs (#5473) next »