[libsoup] soup-headers: fix possible null dereference
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] soup-headers: fix possible null dereference
- Date: Mon, 5 Dec 2016 14:52:17 +0000 (UTC)
commit cf21cfa00bc18657f71a76e978ad9867ee64fe6c
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Dec 3 22:05:02 2016 +0100
soup-headers: fix possible null dereference
https://bugzilla.gnome.org/show_bug.cgi?id=775579
libsoup/soup-headers.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
index 9ad0a21..1c8900e 100644
--- a/libsoup/soup-headers.c
+++ b/libsoup/soup-headers.c
@@ -630,11 +630,13 @@ gboolean
soup_header_contains (const char *header, const char *token)
{
const char *end;
- guint len = strlen (token);
+ guint len;
g_return_val_if_fail (header != NULL, FALSE);
g_return_val_if_fail (token != NULL, FALSE);
+ len = strlen (token);
+
header = skip_delims (header, ',');
while (*header) {
end = skip_item (header, ',');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]