|
|
@ -0,0 +1,24 @@ |
|
|
|
Index: slp.c
|
|
|
|
===================================================================
|
|
|
|
RCS file: /cvsroot/gaim/gaim/src/protocols/msn/slp.c,v |
|
|
|
retrieving revision 1.7 |
|
|
|
retrieving revision 1.8 |
|
|
|
diff -u -d -p -r1.7 -r1.8
|
|
|
|
--- gaim-old/src/protocols/msn/slp.c 15 Jun 2004 02:37:25 -0000 1.7
|
|
|
|
+++ gaim-new/src/protocols/msn/slp.c 11 Aug 2004 18:05:10 -0000 1.8
|
|
|
|
@@ -645,8 +645,12 @@ msn_slp_sip_recv(MsnSlpLink *slplink, co
|
|
|
|
if ((c = strchr(status, '\r')) || (c = strchr(status, '\n')) || |
|
|
|
(c = strchr(status, '\0'))) |
|
|
|
{ |
|
|
|
- strncpy(temp, status, c - status);
|
|
|
|
- temp[c - status] = '\0';
|
|
|
|
+ size_t offset = c - status;
|
|
|
|
+ if (offset >= sizeof(temp))
|
|
|
|
+ offset = sizeof(temp) - 1;
|
|
|
|
+
|
|
|
|
+ strncpy(temp, status, offset);
|
|
|
|
+ temp[offset] = '\0';
|
|
|
|
} |
|
|
|
|
|
|
|
gaim_debug_error("msn", "Received non-OK result: %s\n", temp); |
|
|
|
|