From: Ilia Alshanetsky Date: Sat, 16 Sep 2006 19:08:59 +0000 (+0000) Subject: MFB: One last expand_filepath() check X-Git-Tag: RELEASE_1_0_0RC1~1646 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d611c862c0a8ab4bf9fb34e3f575f2729e0f084;p=php MFB: One last expand_filepath() check --- diff --git a/ext/dom/document.c b/ext/dom/document.c index a5218462e6..cffdb6a334 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1395,8 +1395,9 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p if ((uri->scheme == NULL || isFileUri)) { /* XXX possible buffer overflow if VCWD_REALPATH does not know size of resolved_path */ - if (! VCWD_REALPATH(source, resolved_path)) { - expand_filepath(source, resolved_path TSRMLS_CC); + if (!VCWD_REALPATH(source, resolved_path) && !expand_filepath(source, resolved_path TSRMLS_CC)) { + xmlFreeURI(uri); + return NULL; } file_dest = resolved_path; }