summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2016-04-22 16:13:42 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2016-06-20 12:39:44 +0200
commit6e98162c8b015b97f7067fefd29204bca692275e (patch)
treeb12a41d56abb67305e579d96367f2fc43b22914f
parentf8c2ab720de6f7741f4af10f43b95d27c27ecc8e (diff)
downloadlibrest-6e98162c8b015b97f7067fefd29204bca692275e.tar.gz
RestProxyCall: Prevent segfault in prepare_message
soup_form_request_new_from_hash can return NULL, e.g. if the given url is malformed.
-rw-r--r--rest/rest-proxy-call.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 09584eb..7cd4c0d 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -844,6 +844,10 @@ prepare_message (RestProxyCall *call, GError **error_out)
hash);
g_hash_table_unref (hash);
+
+ if (!message)
+ return NULL;
+
} else {
SoupMultipart *mp;
RestParamsIter iter;