cvs: php4 /main fopen_wrappers.c
| From: | Sterling Hughes | Date: | Wed, 26 Mar 2003 23:01:39 +0000 |
| Subject: | cvs: php4 /main fopen_wrappers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-19788@lists.php.net to get a copy of this message | ||
sterling Wed Mar 26 18:01:39 2003 EDT
Modified files:
/php4/main fopen_wrappers.c
Log:
fix segfault
Index: php4/main/fopen_wrappers.c
diff -u php4/main/fopen_wrappers.c:1.159 php4/main/fopen_wrappers.c:1.160
--- php4/main/fopen_wrappers.c:1.159 Sun Feb 23 17:30:02 2003
+++ php4/main/fopen_wrappers.c Wed Mar 26 18:01:39 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.c,v 1.159 2003/02/23 22:30:02 sniper Exp $ */
+/* $Id: fopen_wrappers.c,v 1.160 2003/03/26 23:01:39 sterling Exp $ */
/* {{{ includes
*/
@@ -490,7 +490,13 @@
*/
PHPAPI char *php_strip_url_passwd(char *url)
{
- register char *p = url, *url_start;
+ register char *p, *url_start;
+
+ if (url == NULL) {
+ return NULL;
+ }
+
+ p = url;
while (*p) {
if (*p==':' && *(p+1)=='/' && *(p+2)=='/') {