|
Lines 640-652
Link Here
|
| 640 |
/* It's not valid. Kill this off. */ |
640 |
/* It's not valid. Kill this off. */ |
| 641 |
char temp[32]; |
641 |
char temp[32]; |
| 642 |
const char *c; |
642 |
const char *c; |
|
|
643 |
size_t offset; |
| 643 |
|
644 |
|
|
|
645 |
memset(temp, 0, sizeof(temp)); |
| 644 |
/* Eww */ |
646 |
/* Eww */ |
| 645 |
if ((c = strchr(status, '\r')) || (c = strchr(status, '\n')) || |
647 |
if ((c = strchr(status, '\r')) || (c = strchr(status, '\n')) || |
| 646 |
(c = strchr(status, '\0'))) |
648 |
(c = strchr(status, '\0'))) |
| 647 |
{ |
649 |
{ |
| 648 |
strncpy(temp, status, c - status); |
650 |
offset = c - status; |
| 649 |
temp[c - status] = '\0'; |
651 |
if (offset >= sizeof(temp)) |
|
|
652 |
offset = sizeof(temp) - 1; |
| 653 |
strncpy(temp, status, offset); |
| 650 |
} |
654 |
} |
| 651 |
|
655 |
|
| 652 |
gaim_debug_error("msn", "Received non-OK result: %s\n", temp); |
656 |
gaim_debug_error("msn", "Received non-OK result: %s\n", temp); |