]> granicus.if.org Git - php/commitdiff
One last expand_filepath() check
authorIlia Alshanetsky <iliaa@php.net>
Sat, 16 Sep 2006 19:07:35 +0000 (19:07 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 16 Sep 2006 19:07:35 +0000 (19:07 +0000)
ext/dom/document.c

index 88b591409c8f9437059cb3de0e2f26c20dc867c2..8bbd4696575c6ede7bbd7aeaf5444678bd726d53 100644 (file)
@@ -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;
        }