cvs: php4 / NEWS /ext/standard/ url.c

From: Date: Fri, 09 Jun 2000 13:15:20 +0000
Subject: cvs: php4 / NEWS /ext/standard/ url.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-114@lists.php.net to get a copy of this message
zeev Fri Jun 9 06:15:20 2000 EDT Modified files: /php4 NEWS /php4/ext/standard url.c Log: Fix #4928 Be *CAREFUL* with the _ex API, guys! Index: php4/NEWS diff -u php4/NEWS:1.283 php4/NEWS:1.284 --- php4/NEWS:1.283 Thu Jun 8 19:18:50 2000 +++ php4/NEWS Fri Jun 9 06:15:19 2000 @@ -2,8 +2,11 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2000, Version 4.0.1 -- Parse errors in the php.ini files under Windows will no longer mess up the - HTTP headers in CGI mode and are now displayed in a message box (Zeev) +- Fixed a bug in rawurldecode() that would cause in rawurldecode() corrupting + its argument (Zeev) +- Parse errors (or other errors) in the php.ini files under Windows will no + longer mess up the HTTP headers in CGI mode and are now displayed in a + message box (Zeev) - Fixed a crash in OCIFetchStatement() when trying to read after all data has already been read. (Thies) - fopen_wrappers() are now extensible via modules (Hartmut Holzgraefe) Index: php4/ext/standard/url.c diff -u php4/ext/standard/url.c:1.25 php4/ext/standard/url.c:1.26 --- php4/ext/standard/url.c:1.25 Mon Jun 5 12:47:44 2000 +++ php4/ext/standard/url.c Fri Jun 9 06:15:19 2000 @@ -15,7 +15,7 @@ | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.25 2000/06/05 19:47:44 andi Exp $ */ +/* $Id: url.c,v 1.26 2000/06/09 13:15:19 zeev Exp $ */ #include <stdlib.h> #include <string.h> @@ -391,6 +391,7 @@ { pval **arg; int len; + char *str; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { WRONG_PARAM_COUNT; @@ -400,9 +401,10 @@ if (!(*arg)->value.str.len) { RETURN_FALSE; } - len = php_raw_url_decode((*arg)->value.str.val, (*arg)->value.str.len); + str = estrndup(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg)); + len = php_raw_url_decode(str, Z_STRLEN_PP(arg)); - RETVAL_STRINGL((*arg)->value.str.val, len, 1); + RETVAL_STRINGL(str, len, 0); } /* }}} */

« previous php.cvs (#114) next »