[libsoup/gnome-3-6] soup-uri: don't decode %00 in URIs



commit 1dd81dad01936c2b0a997b040dee01a1ff55a0f0
Author: Dan Winship <danw gnome org>
Date:   Mon Dec 10 22:20:59 2012 +0100

    soup-uri: don't decode %00 in URIs
    
    We were accidentally decoding %00 to '\0' in URIs, causing a few
    WebKit tests to fail. Leave it undecoded instead.

 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 4be679d..71d58e6 100644
--- a/libsoup/soup-uri.c
+++ b/libsoup/soup-uri.c
@@ -707,7 +707,7 @@ uri_normalized_copy (const char *part, int length,
 
 			c = HEXCHAR (s);
 			if (soup_char_is_uri_unreserved (c) ||
-			    strchr (unescape_extra, c)) {
+			    (c && strchr (unescape_extra, c))) {
 				*d++ = c;
 				s += 3;
 			} else {



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