comparison src/protocols/msn/utils.c @ 9090:cab225a333b5

[gaim-migrate @ 9867] On win32 (and possibly some other setups), any MSN messages with a comma in it were causing a disconnect. Fixed! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 27 May 2004 08:02:43 +0000
parents 3ea82ab12cb9
children 502707ca1836
comparison
equal deleted inserted replaced
9089:15da00b09b7c 9090:cab225a333b5
249 249
250 c += 6; 250 c += 6;
251 end = strchr(c, '\"'); 251 end = strchr(c, '\"');
252 comma = strchr(c, ','); 252 comma = strchr(c, ',');
253 253
254 namelen = (unsigned int)((comma != NULL ? comma : end) - c); 254 if (comma == NULL || comma > end)
255 namelen = (unsigned int)(end - c);
256 else
257 namelen = (unsigned int)(comma - c);
255 258
256 fontface = g_strndup(c, namelen); 259 fontface = g_strndup(c, namelen);
257 c = end + 2; 260 c = end + 2;
258 } 261 }
259 else 262 else