1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-25 10:50:08 +03:00

uri: Add explicit cast in xmlSaveUri

Fix -fsanitize=implicit-conversion error. We should probably
percent-escape the host name here.
This commit is contained in:
Nick Wellnhofer 2023-01-22 14:13:56 +01:00
parent f8c5e7fb75
commit f65133fc04

3
uri.c
View File

@ -1171,7 +1171,8 @@ xmlSaveUri(xmlURIPtr uri) {
if (temp == NULL) goto mem_error;
ret = temp;
}
ret[len++] = *p++;
/* TODO: escaping? */
ret[len++] = (xmlChar) *p++;
}
}
if (uri->port > 0) {