[libsoup] soup_form_decode_multipart: check that msg really is a non-NULL message
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] soup_form_decode_multipart: check that msg really is a non-NULL message
- Date: Mon, 13 Feb 2012 13:44:18 +0000 (UTC)
commit f4ca9a57535683db8c5d4599d53e5fb61fce806d
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Wed Feb 8 10:05:02 2012 +0000
soup_form_decode_multipart: check that msg really is a non-NULL message
If it wasn't, the next line would segfault anyway.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
Reviewed-by: Dan Winship <danw gnome org>
libsoup/soup-form.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-form.c b/libsoup/soup-form.c
index 4691c57..a781d3c 100644
--- a/libsoup/soup-form.c
+++ b/libsoup/soup-form.c
@@ -159,6 +159,8 @@ soup_form_decode_multipart (SoupMessage *msg, const char *file_control_name,
char *disposition, *name;
int i;
+ g_return_val_if_fail (SOUP_IS_MESSAGE (msg), NULL);
+
multipart = soup_multipart_new_from_message (msg->request_headers,
msg->request_body);
if (!multipart)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]