Browse Source

MFB

migration/RELEASE_1_0_0
Nuno Lopes 20 years ago
parent
commit
121a317695
  1. 6
      ext/xmlreader/php_xmlreader.c
  2. 6
      ext/xmlwriter/php_xmlwriter.c

6
ext/xmlreader/php_xmlreader.c

@ -259,9 +259,9 @@ 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)) {
xmlFreeURI(uri);
return NULL;
}
file_dest = resolved_path;
}

6
ext/xmlwriter/php_xmlwriter.c

@ -276,9 +276,9 @@ char *_xmlwriter_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)) {
xmlFreeURI(uri);
return NULL;
}
file_dest = resolved_path;
}

Loading…
Cancel
Save