From c009aefa3749f99fcbacac050ee3e0cf779be463 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 12 Jan 2023 15:50:07 +0100 Subject: message: fix critical when trying to create a message from invalid URI soup_message_new_from_uri() raises a critical if SOUP_URI_IS_VALID returns FALSE. This macro also checks if the URI host is not an empty string, which was not checked in the caller code. Fix critical when running such GStreamer pipeline: gst-launch-1.0 souphttpsrc location=http:///not-there.ogg ! fakesink --- libsoup/soup-message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsoup') diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c index a7b7349c..4e6b28b9 100644 --- a/libsoup/soup-message.c +++ b/libsoup/soup-message.c @@ -976,7 +976,7 @@ soup_message_new (const char *method, const char *uri_string) uri = g_uri_parse (uri_string, SOUP_HTTP_URI_FLAGS, NULL); if (!uri) return NULL; - if (!g_uri_get_host (uri)) { + if (!SOUP_URI_IS_VALID (uri)) { g_uri_unref (uri); return NULL; } -- cgit v1.2.1