if (uri->scheme != NULL) {
/* absolute file uris - libxml only supports localhost or empty host */
if (strncasecmp(source, "file:///", 8) == 0) {
- if (strlen(source) == 8) {
+ if (source[sizeof("file:///") - 1] == '\0') {
return NULL;
}
isFileUri = 1;
source += 7;
#endif
} else if (strncasecmp(source, "file://localhost/",17) == 0) {
- if (strlen(source) == 17) {
+ if (source[sizeof("file://localhost/") - 1] == '\0') {
return NULL;
}
}
file_dest = resolved_path;
+ } else {
+ file_dest = source;
}
xmlFreeURI(uri);