After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612644 - crash in soup_uri_new_with_base
crash in soup_uri_new_with_base
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
unspecified
Other All
: Normal critical
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-03-11 22:59 UTC by arnaud.lb
Modified: 2010-03-13 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description arnaud.lb 2010-03-11 22:59:50 UTC
Hi,

There is a typo in soup_uri_new_with_base which causes some crashes :

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++) {
Comment 1 Dan Winship 2010-03-13 16:59:00 UTC
doh. thanks, fixed in git