[libsoup] soup_message_headers_append: require @name to be non-empty
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Subject: [libsoup] soup_message_headers_append: require @name to be non-empty
- Date: Sun, 19 Apr 2009 11:27:37 -0400 (EDT)
commit 91aa7b292dae22200df3d9994cfd2c533ba17f53
Author: Dan Winship <danw gnome org>
Date: Sun Apr 19 11:22:11 2009 -0400
soup_message_headers_append: require @name to be non-empty
---
libsoup/soup-message-headers.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index e77c9fe..f0abb78 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -170,10 +170,10 @@ soup_message_headers_append (SoupMessageHeaders *hdrs,
* compiled with G_DISABLE_CHECKS.
*/
#ifndef G_DISABLE_CHECKS
- g_return_if_fail (strpbrk (name, " \t\r\n:") == NULL);
+ g_return_if_fail (*name && strpbrk (name, " \t\r\n:") == NULL);
g_return_if_fail (strpbrk (value, "\r\n") == NULL);
#else
- if (strpbrk (name, " \t\r\n:")) {
+ if (*name && strpbrk (name, " \t\r\n:")) {
g_warning ("soup_message_headers_append: Ignoring bad name '%s'", name);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]