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

(-)msnslp.c.orig (-2 / +6 lines)
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);
(-)msg.c.orig (-1 / +2 lines)
Lines 257-263 Link Here
257
257
258
		msg->msnslp_message = TRUE;
258
		msg->msnslp_message = TRUE;
259
259
260
		memcpy(header, tmp, 48);
260
		memset(header, 0, sizeof(header));
261
		memcpy(header, tmp, sizeof(header)-1);
261
262
262
		tmp += 48;
263
		tmp += 48;
263
264

Return to bug 56630