im.pidgin.pidgin: e2f6be4e0c0daee25fdb3250a7e16a881922f8c4

datallah at pidgin.im datallah at pidgin.im
Tue Oct 16 13:15:35 EDT 2007


-----------------------------------------------------------------
Revision: e2f6be4e0c0daee25fdb3250a7e16a881922f8c4
Ancestor: e33c17e58da161b8cffaf13e9d79e9bb4b9ce4ce
Author: datallah at pidgin.im
Date: 2007-10-16T17:09:51
Branch: im.pidgin.pidgin

Modified files:
        libpurple/proxy.c

ChangeLog: 

Prevent a crash when the proxy username isn't specified. Fixes #3583.

-------------- next part --------------
============================================================
--- libpurple/proxy.c	3ae21261d2562cb9c57319ec0e756c49e5344b9a
+++ libpurple/proxy.c	b29a98dc78c7547ebe25d7252831ac65b6d3b891
@@ -690,11 +690,12 @@ http_canread(gpointer data, gint source,
 				gchar *tmp = ntlm;
 				guint8 *nonce;
 				gchar *domain = (gchar*)purple_proxy_info_get_username(connect_data->gpi);
-				gchar *username;
+				gchar *username = NULL;
 				gchar *request;
 				gchar *response;
 
-				username = strchr(domain, '\\');
+				if (domain != NULL)
+					username = strchr(domain, '\\');
 				if (username == NULL)
 				{
 					purple_proxy_connect_data_disconnect_formatted(connect_data,
@@ -738,9 +739,11 @@ http_canread(gpointer data, gint source,
 			} else if((ntlm = g_strrstr((const char *)connect_data->read_buffer, "Proxy-Authenticate: NTLM"))) { /* Empty message */
 				gchar request[2048];
 				gchar *domain = (gchar*) purple_proxy_info_get_username(connect_data->gpi);
-				gchar *username;
+				gchar *username = NULL;
 				int request_len;
-				username = strchr(domain, '\\');
+
+				if (domain != NULL)
+					username = strchr(domain, '\\');
 				if (username == NULL)
 				{
 					purple_proxy_connect_data_disconnect_formatted(connect_data,


More information about the Commits mailing list