# HG changeset patch # User mklencke@gmx.net # Date 1271905755 0 # Node ID 9e60e300541a029376c766296d35aed5bf046e93 # Parent 3ac7f10d13d47cad13a179f1954e8a950e8c6462 Fix an invalid memory deref with Windows proxy settings when there's no ":port" Patch from Marten Klencke. Closes #11701. committer: Paul Aurich diff -r 3ac7f10d13d4 -r 9e60e300541a COPYRIGHT --- a/COPYRIGHT Wed Apr 21 19:07:19 2010 +0000 +++ b/COPYRIGHT Thu Apr 22 03:09:15 2010 +0000 @@ -245,6 +245,7 @@ Jochen Kemnade Yann Kerherve Gordian Klein +Marten Klencke Krzysztof Klinikowski Akuke Kok Kir Kolyshkin diff -r 3ac7f10d13d4 -r 9e60e300541a ChangeLog --- a/ChangeLog Wed Apr 21 19:07:19 2010 +0000 +++ b/ChangeLog Thu Apr 22 03:09:15 2010 +0000 @@ -18,6 +18,8 @@ GnuTLS manual for documentation on the format of the priority strings. * Fix autoconf detection of Python. (Brad Smith) + * Fix a crash when a Windows proxy (in IE) does not have a port. + (Marten Klencke) Pidgin: * Moved the "Debugging Information" section of the About box to a diff -r 3ac7f10d13d4 -r 9e60e300541a libpurple/proxy.c --- a/libpurple/proxy.c Wed Apr 21 19:07:19 2010 +0000 +++ b/libpurple/proxy.c Thu Apr 22 03:09:15 2010 +0000 @@ -379,11 +379,16 @@ char *d; d = g_strrstr(host, ":"); - if (d) + if (d) { *d = '\0'; - d++; - if (*d) - sscanf(d, "%d", &port); + + d++; + if (*d) + sscanf(d, "%d", &port); + + if (port == 0) + port = default_port; + } purple_proxy_info_set_host(info, host); purple_proxy_info_set_port(info, port);