chillispot: fix buffer overflow (thx to Sebastian Gottschall)
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 31 Jan 2009 03:23:21 +0000 (03:23 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 31 Jan 2009 03:23:21 +0000 (03:23 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@14295 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/chillispot/patches/120-fix_bufferoverflow.patch [new file with mode: 0644]

diff --git a/net/chillispot/patches/120-fix_bufferoverflow.patch b/net/chillispot/patches/120-fix_bufferoverflow.patch
new file mode 100644 (file)
index 0000000..abc293b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/radius.c
++++ b/src/radius.c
+@@ -1002,7 +1002,7 @@ int radius_pwencode(struct radius_t *thi
+   }
+   /* Copy first 128 octets of src into dst */
+-  if (srclen <= 128) 
++  if (srclen > 128)
+     memcpy(dst, src, 128);
+   else
+     memcpy(dst, src, srclen);