diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-09-16 19:07:35 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-09-16 19:07:35 +0000 |
commit | 9f217cd983a843b43261f7d181e92d3cc0430a4a (patch) | |
tree | b018734451db9556ff42bc483d4490fa4ba59298 | |
parent | 92c3cfd81fcdc798171926ff1299fdfc83bf3f6f (diff) | |
download | php-git-9f217cd983a843b43261f7d181e92d3cc0430a4a.tar.gz |
One last expand_filepath() check
-rw-r--r-- | ext/dom/document.c | 5 |
1 files 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; } |