[package] busybox: update to v1.14.4 (closes: #5619)
[openwrt-10.03/.git] / package / busybox / patches / 430-uniq_memleak.patch
index 10f464bd144b7132e83d3d03e5c5d1a3dae78c87..48127a57ce52212d2201c389c89f6deb79b7e4f0 100644 (file)
@@ -1,12 +1,11 @@
-diff -ur bb.old/coreutils/uniq.c bb.dev/coreutils/uniq.c
---- bb.old/coreutils/uniq.c    2007-01-24 22:34:43.000000000 +0100
-+++ bb.dev/coreutils/uniq.c    2007-02-16 20:04:19.245454368 +0100
-@@ -83,6 +83,8 @@
+--- a/coreutils/uniq.c
++++ b/coreutils/uniq.c
+@@ -82,6 +82,8 @@ int uniq_main(int argc UNUSED_PARAM, cha
  
-                       if (!s0 || strcmp(e0, e1)) {
+                       if (!s0 || strncmp(e0, e1, max_chars)) {
                                break;
 +                      } else {
 +                              free(s1);
                        }
  
-                       ++dups;          /* Note: Testing for overflow seems excessive. */
+                       ++dups;  /* note: testing for overflow seems excessive. */