cvs: php4 /ext/standard fsock.c

From: Date: Thu, 09 Jan 2003 03:33:15 +0000
Subject: cvs: php4 /ext/standard fsock.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17754@lists.php.net to get a copy of this message
iliaa Wed Jan 8 22:33:15 2003 EDT Modified files: /php4/ext/standard fsock.c Log: Fixed bug #21529 (memory corruption by fsockopen()). Index: php4/ext/standard/fsock.c diff -u php4/ext/standard/fsock.c:1.107 php4/ext/standard/fsock.c:1.108 --- php4/ext/standard/fsock.c:1.107 Tue Dec 31 11:07:41 2002 +++ php4/ext/standard/fsock.c Wed Jan 8 22:33:15 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.107 2002/12/31 16:07:41 sebastian Exp $ */ +/* $Id: fsock.c,v 1.108 2003/01/09 03:33:15 iliaa Exp $ */ /* converted to PHP Streams and moved much code to main/network.c [wez] */ @@ -178,7 +178,7 @@ } if (zerrstr) { zval_dtor(zerrstr); - ZVAL_STRING(zerrno, "", 1); + ZVAL_STRING(zerrstr, "", 1); } if (port > 0) { /* connect to a host */ @@ -261,6 +261,7 @@ char *buf = php_socket_strerror(err, NULL, 0); /* no need to dup; we would only need to efree buf anyway */ + zval_dtor(zerrstr); ZVAL_STRING(zerrstr, buf, 0); } RETURN_FALSE;

« previous php.cvs (#17754) next »