diff options
author | Nuno Lopes <nlopess@php.net> | 2006-09-16 18:15:25 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-09-16 18:15:25 +0000 |
commit | c7101ba6d2167555637ffb1f5009340a04c2334d (patch) | |
tree | f5a2e27ab2909320945a9231a297e11083052c25 /ext/xmlreader | |
parent | 4c65e0e1cd4c4907b203c8dedaab726e162292db (diff) | |
download | php-git-c7101ba6d2167555637ffb1f5009340a04c2334d.tar.gz |
add missing checks around expand_filepath()
Diffstat (limited to 'ext/xmlreader')
-rw-r--r-- | ext/xmlreader/php_xmlreader.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 05d1bb9a51..d5eca3d167 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -260,9 +260,8 @@ char *_xmlreader_get_valid_file_path(char *source, char *resolved_path, int reso file_dest = source; 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)) { + return NULL; } file_dest = resolved_path; } |