fix ipkg segfault and add conffiles patch from #2946
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2008 02:25:16 +0000 (02:25 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2008 02:25:16 +0000 (02:25 +0000)
SVN-Revision: 10090

package/busybox/patches/522-memleak.patch
package/busybox/patches/523-conffiles_fix.patch [new file with mode: 0644]

index 1bcfb8f408a1da568e6fc8054a0469e645568464..ab639c59bf27e0d01912cbf6a3cc2f9b88784065 100644 (file)
@@ -1,15 +1,3 @@
-Index: busybox-1.8.2/archival/libipkg/ipkg_install.c
-===================================================================
---- busybox-1.8.2.orig/archival/libipkg/ipkg_install.c 2007-12-30 00:02:53.577161007 +0100
-+++ busybox-1.8.2/archival/libipkg/ipkg_install.c      2007-12-30 00:03:14.042327251 +0100
-@@ -500,6 +500,7 @@
-              }
-         }
-      }
-+       pkg_free_installed_files(new_pkg);
-      return 0;
- }
 Index: busybox-1.8.2/archival/libipkg/pkg.c
 ===================================================================
 --- busybox-1.8.2.orig/archival/libipkg/pkg.c  2007-12-30 00:27:32.001919565 +0100
diff --git a/package/busybox/patches/523-conffiles_fix.patch b/package/busybox/patches/523-conffiles_fix.patch
new file mode 100644 (file)
index 0000000..8206faf
--- /dev/null
@@ -0,0 +1,21 @@
+Index: busybox-1.8.2/archival/libipkg/pkg.c
+===================================================================
+--- busybox-1.8.2.orig/archival/libipkg/pkg.c  2008-01-02 21:53:12.616453611 +0100
++++ busybox-1.8.2/archival/libipkg/pkg.c       2008-01-02 21:54:41.462489150 +0100
+@@ -587,13 +587,14 @@
+                 return NULL;
+                }
+                temp[0]='\0';
+-               strncpy(temp, "Conffiles:\n", 12);
++               strncpy(temp, "Conffiles: ", 12);
+              for (iter = pkg->conffiles.head; iter; iter = iter->next) {
+                   if (iter->data->name && iter->data->value) {
+-                         snprintf(line_str, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value);
++                         snprintf(line_str, LINE_LEN, "%s %s", iter->data->name, iter->data->value);
+                          strncat(temp, line_str, strlen(line_str));           
+                   }
+              }
++             strcat(temp, "\n");
+         } else if (strcasecmp(field, "Conflicts") == 0) {
+              int i;