]> git.pld-linux.org Git - packages/pidgin.git/commitdiff
- fixed buffer overflow in MSN protocol, taken from Gentoo
authoraflinta <aflinta@pld-linux.org>
Sun, 15 Aug 2004 20:29:21 +0000 (20:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gaim-msn-bug.patch -> 1.1

gaim-msn-bug.patch [new file with mode: 0644]

diff --git a/gaim-msn-bug.patch b/gaim-msn-bug.patch
new file mode 100644 (file)
index 0000000..bed35af
--- /dev/null
@@ -0,0 +1,18 @@
+diff -urN gaim-0.81.orig/src/protocols/msn/slp.c gaim-0.81/src/protocols/msn/slp.c
+--- gaim-0.81.orig/src/protocols/msn/slp.c     2004-08-15 18:09:45.273642000 +0200
++++ gaim-0.81/src/protocols/msn/slp.c  2004-08-15 22:17:59.055443008 +0200
+@@ -645,8 +645,12 @@
+                       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);
This page took 0.026836 seconds and 4 git commands to generate.