View | Details | Raw Unified | Return to bug 56630
Collapse All | Expand All

(-)slp.c.orig (-2 / +6 lines)
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);
(-)object.c.orig (-3 / +9 lines)
Lines 35-45 Link Here
35
	if ((tag = strstr(str, id "=\"")) != NULL) \
35
	if ((tag = strstr(str, id "=\"")) != NULL) \
36
	{ \
36
	{ \
37
		char buf[16]; \
37
		char buf[16]; \
38
		size_t offset; \
38
		tag += strlen(id "=\""); \
39
		tag += strlen(id "=\""); \
39
		c = strchr(tag, '"'); \
40
		c = strchr(tag, '"'); \
40
		strncpy(buf, tag, c - tag); \
41
		if (c != NULL) { \
41
		buf[c - tag] = '\0'; \
42
			memset(buf, 0, sizeof(buf)); \
42
		obj->field = atoi(buf); \
43
			offset = c - tag; \
44
			if (offset >= sizeof(buf)) \
45
				offset = sizeof(buf) - 1; \
46
			strncpy(buf, tag, offset); \
47
			obj->field = atoi(buf); \
48
		} \
43
	}
49
	}
44
50
45
static GList *local_objs;
51
static GList *local_objs;

Return to bug 56630