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;
}
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;
}