summaryrefslogtreecommitdiff
path: root/packages/parted/parted-1.8.0
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-01-16 18:04:08 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-01-16 18:04:08 +0000
commitf704267b58de181fff67d0ab0c45ea4a40da687a (patch)
tree43419e3e2deb6915d5c02e49d4326b8011defc92 /packages/parted/parted-1.8.0
parenteb485afd8f028a7d128d500f05418d88260e9c95 (diff)
parent16cb2f321befd4c69c9c938c2ec8386fcfb3336a (diff)
merge of '8c0eb673de0b4022949225ca080e2dd264461926'
and 'a536e1f1c106f600dacb9b7c677edf69297378fb'
Diffstat (limited to 'packages/parted/parted-1.8.0')
-rw-r--r--packages/parted/parted-1.8.0/.mtn2git_empty0
-rw-r--r--packages/parted/parted-1.8.0/memory_allocation.patch42
2 files changed, 42 insertions, 0 deletions
diff --git a/packages/parted/parted-1.8.0/.mtn2git_empty b/packages/parted/parted-1.8.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/parted/parted-1.8.0/.mtn2git_empty
diff --git a/packages/parted/parted-1.8.0/memory_allocation.patch b/packages/parted/parted-1.8.0/memory_allocation.patch
new file mode 100644
index 0000000000..ba3709680b
--- /dev/null
+++ b/packages/parted/parted-1.8.0/memory_allocation.patch
@@ -0,0 +1,42 @@
+--- parted-1.8.0/libparted/exception.c_orig 2006-12-11 19:44:23.000000000 +0000
++++ parted-1.8.0/libparted/exception.c 2006-12-11 19:47:53.000000000 +0000
+@@ -231,6 +231,9 @@
+ PedExceptionOption ex_opts, const char* message, ...)
+ {
+ va_list arg_list;
++ int result;
++ static int size = 1000;
++
+
+ if (ex)
+ ped_exception_catch ();
+@@ -239,16 +242,22 @@
+ if (!ex)
+ goto no_memory;
+
+- ex->message = (char*) malloc (8192);
+- if (!ex->message)
+- goto no_memory;
+-
+ ex->type = ex_type;
+ ex->options = ex_opts;
+
+- va_start (arg_list, message);
+- vsnprintf (ex->message, 8192, message, arg_list);
+- va_end (arg_list);
++ while (1) {
++ ex->message = (char*) malloc (size);
++ if (!ex->message)
++ goto no_memory;
++ va_start (arg_list, message);
++ result = vsnprintf (ex->message, size, message, arg_list);
++ va_end (arg_list);
++
++ if (result > -1 && result < size)
++ break;
++ size += 10;
++ }
++
+
+ return do_throw ();
+