Re: cvs: php-src /ext/standard http_fopen_wrapper.c
| From: | Andi Gutmans | Date: | Sun, 30 May 2004 12:29:27 +0000 |
| Subject: | Re: cvs: php-src /ext/standard http_fopen_wrapper.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-27501@lists.php.net to get a copy of this message | ||
Can you please use estrndup() instead of estrdup()?
Thanks,
Andi
At 01:38 PM 5/28/2004 +0000, Stefan Esser wrote:
sesser Fri May 28 09:38:07 2004 EDTModified files:/php-src/ext/standard http_fopen_wrapper.cLog: Fixed off-by-one in http_fopen_wrapper http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.87&r2=1.88&ty=u Index: php-src/ext/standard/http_fopen_wrapper.c diff -u php-src/ext/standard/http_fopen_wrapper.c:1.87 php-src/ext/standard/http_fopen_wrapper.c:1.88--- php-src/ext/standard/http_fopen_wrapper.c:1.87 Thu Apr 22 23:37:20 2004+++ php-src/ext/standard/http_fopen_wrapper.c Fri May 28 09:38:06 2004 @@ -18,7 +18,7 @@| Wez Furlong <wez@thebrainroom.com> | +----------------------------------------------------------------------+*/ -/* $Id: http_fopen_wrapper.c,v 1.87 2004/04/23 03:37:20 pollita Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.88 2004/05/28 13:38:06 sesser Exp $ */ #include "php.h" #include "php_globals.h" @@ -498,7 +498,12 @@char *s = strrchr(resource->path, '/'); if (!s) { s = resource->path; - *s = '/'; + if (!s[0]) { + efree(s); + s = resource->path = estrdup("/"); + } else { + *s = '/'; + } } s[1] = '\0'; if (resource->path && *(resource->path) == '/' && *(resource->path + 1) == '\0') {-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php