From 1d611c862c0a8ab4bf9fb34e3f575f2729e0f084 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 16 Sep 2006 19:08:59 +0000 Subject: [PATCH] MFB: One last expand_filepath() check --- ext/dom/document.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.50.1