mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-11 05:17:45 +03:00
Return if xmlParseURI() failed, instead of crashing
This commit is contained in:
parent
1002a220a4
commit
f08c5308ca
@ -88,6 +88,8 @@ virt_viewer_util_extract_host(const char *uristr,
|
||||
uristr = "xen:///";
|
||||
|
||||
uri = xmlParseURI(uristr);
|
||||
g_return_val_if_fail(uri != NULL, 1);
|
||||
|
||||
if (host) {
|
||||
if (!uri || !uri->server)
|
||||
*host = g_strdup("localhost");
|
||||
|
Loading…
Reference in New Issue
Block a user