summaryrefslogtreecommitdiff
path: root/packages/ipkg/ipkg-0.99.129
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/ipkg/ipkg-0.99.129
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/ipkg/ipkg-0.99.129')
-rw-r--r--packages/ipkg/ipkg-0.99.129/.mtn2git_empty0
-rw-r--r--packages/ipkg/ipkg-0.99.129/buffer-overflow.patch38
2 files changed, 38 insertions, 0 deletions
diff --git a/packages/ipkg/ipkg-0.99.129/.mtn2git_empty b/packages/ipkg/ipkg-0.99.129/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ipkg/ipkg-0.99.129/.mtn2git_empty
diff --git a/packages/ipkg/ipkg-0.99.129/buffer-overflow.patch b/packages/ipkg/ipkg-0.99.129/buffer-overflow.patch
index e69de29bb2..91234fd53f 100644
--- a/packages/ipkg/ipkg-0.99.129/buffer-overflow.patch
+++ b/packages/ipkg/ipkg-0.99.129/buffer-overflow.patch
@@ -0,0 +1,38 @@
+Index: ipkg_cmd.c
+===================================================================
+RCS file: /cvs/familiar/dist/ipkg/C/ipkg_cmd.c,v
+retrieving revision 1.96
+diff -u -r1.96 ipkg_cmd.c
+--- C/ipkg_cmd.c 19 Aug 2004 10:55:47 -0000 1.96
++++ C/ipkg_cmd.c 11 Sep 2004 19:43:14 -0000
+@@ -860,6 +860,7 @@
+ str_list_elt_t *iter;
+ char *pkg_version;
+ size_t buff_len = 8192;
++ size_t used_len;
+ char *buff ;
+
+ buff = (char *)malloc(buff_len);
+@@ -891,9 +892,20 @@
+ }
+ #else
+ if (buff) {
+- snprintf(buff, buff_len, "Package %s (%s) is installed on %s and has the following files:\n",
+- pkg->name, pkg_version, pkg->dest->name);
++ try_again:
++ used_len = snprintf(buff, buff_len, "Package %s (%s) is installed on %s and has the following files:\n",
++ pkg->name, pkg_version, pkg->dest->name) + 1;
++ if (used_len > buff_len) {
++ buff_len *= 2;
++ buff = realloc (buff, buff_len);
++ goto try_again;
++ }
+ for (iter = installed_files->head; iter; iter = iter->next) {
++ used_len += strlen (iter->data) + 1;
++ while (buff_len <= used_len) {
++ buff_len *= 2;
++ buff = realloc (buff, buff_len);
++ }
+ strncat(buff, iter->data, buff_len);
+ strncat(buff, "\n", buff_len);
+ }