|
Lines 224-236
Link Here
|
| 224 |
/* It's not valid. Kill this off. */ |
224 |
/* It's not valid. Kill this off. */ |
| 225 |
char temp[32]; |
225 |
char temp[32]; |
| 226 |
const char *c; |
226 |
const char *c; |
|
|
227 |
size_t offset; |
| 227 |
|
228 |
|
|
|
229 |
memset(temp, 0, sizeof(temp)); |
| 228 |
/* Eww */ |
230 |
/* Eww */ |
| 229 |
if ((c = strchr(status, '\r')) || (c = strchr(status, '\n')) || |
231 |
if ((c = strchr(status, '\r')) || (c = strchr(status, '\n')) || |
| 230 |
(c = strchr(status, '\0'))) |
232 |
(c = strchr(status, '\0'))) |
| 231 |
{ |
233 |
{ |
| 232 |
strncpy(temp, status, c - status); |
234 |
offset = c - status; |
| 233 |
temp[c - status] = '\0'; |
235 |
if (offset >= sizeof(temp)) |
|
|
236 |
offset = sizeof(temp) - 1; |
| 237 |
strncpy(temp, status, offset); |
| 234 |
} |
238 |
} |
| 235 |
|
239 |
|
| 236 |
gaim_debug_error("msn", "Received non-OK result: %s\n", temp); |
240 |
gaim_debug_error("msn", "Received non-OK result: %s\n", temp); |