From 9f217cd983a843b43261f7d181e92d3cc0430a4a Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 16 Sep 2006 19:07:35 +0000 Subject: [PATCH] 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 88b591409c..8bbd469657 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