Mercurial > pidgin
changeset 20359:36da9249f3a9
applied changes from e33c17e58da161b8cffaf13e9d79e9bb4b9ce4ce
through e2f6be4e0c0daee25fdb3250a7e16a881922f8c4
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 21 Oct 2007 05:02:09 +0000 |
parents | 39a7c295c63c |
children | 561cc507708f |
files | libpurple/proxy.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/proxy.c Sun Oct 21 05:01:17 2007 +0000 +++ b/libpurple/proxy.c Sun Oct 21 05:02:09 2007 +0000 @@ -690,11 +690,12 @@ 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 @@ } 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,