[libsoup] Fix a crash in the whitespace-stripping code in soup_uri_new



commit e69be10e1b99723460d9aca45a53cbbd6f2b5673
Author: Dan Winship <danw gnome org>
Date:   Sat Mar 13 11:56:11 2010 -0500

    Fix a crash in the whitespace-stripping code in soup_uri_new
    
    Patch from "arnaud.lb".
    https://bugzilla.gnome.org/show_bug.cgi?id=612644

 libsoup/soup-uri.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-uri.c b/libsoup/soup-uri.c
index 0e3795d..d82fe29 100644
--- a/libsoup/soup-uri.c
+++ b/libsoup/soup-uri.c
@@ -157,7 +157,7 @@ soup_uri_new_with_base (SoupURI *base, const char *uri_string)
 
 	len = strcspn (uri_string, "\t\n\r");
 	if (uri_string[len]) {
-		char *clean = g_malloc (strlen (uri_string + 1)), *d;
+		char *clean = g_malloc (strlen (uri_string) + 1), *d;
 		const char *s;
 
 		for (s = uri_string, d = clean; *s; s++) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]