comparison libpurple/protocols/jabber/jabber.c @ 24834:41e69c65b006

Slightly modified version of a fix fqueze proposed for a crash with the empty resource stuff I committed for 2.5.3.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Tue, 23 Dec 2008 16:55:49 +0000
parents 0700833f0c5d
children 3a4070656d61 d15b50a4db53 43b721aa4b76 c3e44dae2f65 45434c3fd878
comparison
equal deleted inserted replaced
24833:afee51d10412 24834:41e69c65b006
149 149
150 static char *jabber_prep_resource(char *input) { 150 static char *jabber_prep_resource(char *input) {
151 char hostname[256]; /* current hostname */ 151 char hostname[256]; /* current hostname */
152 152
153 /* Empty resource == don't send any */ 153 /* Empty resource == don't send any */
154 if (*input == '\0') 154 if (input == NULL || *input == '\0')
155 return NULL; 155 return NULL;
156 156
157 if (strstr(input, "__HOSTNAME__") == NULL) 157 if (strstr(input, "__HOSTNAME__") == NULL)
158 return g_strdup(input); 158 return g_strdup(input);
159 159