src/protocols/msn/utils.c

changeset 9090
2c7655380bf5
parent 8923
cadbc8e3dfe2
child 9193
6e76f1367896
equal deleted inserted replaced
9089:5bda5ec81c2e 9090:2c7655380bf5
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

mercurial