summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--mpi-patches/fix-mult-bug13
-rw-r--r--mpi-patches/series1
3 files changed, 25 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d3fb46a0..c695c92c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-12-12 Kaz Kylheku <kaz@kylheku.com>
+
+ * mpi-patches/fix-mult-bug: One more flaw discovered in
+ s_mp_mul_d and added to patch. This one caused malloc corruption and
+ crashes, because the incorrect arithmetic causes the function
+ to think that the multiplication will not be needing another
+ digit, but then there is a carry out which does spill into
+ a new digit.
+
+ * mpi-patches/series: Arg! Somehow the patch fix-bad-shift
+ went missing from the series file, even though the patch
+ itself is in the GIT repository.
+
2011-12-06 Kaz Kylheku <kaz@kylheku.com>
Version 047
diff --git a/mpi-patches/fix-mult-bug b/mpi-patches/fix-mult-bug
index bb8b0f0d..78bc59b1 100644
--- a/mpi-patches/fix-mult-bug
+++ b/mpi-patches/fix-mult-bug
@@ -1,7 +1,16 @@
Index: mpi-1.8.6/mpi.c
===================================================================
---- mpi-1.8.6.orig/mpi.c 2011-12-10 19:41:00.000000000 -0800
-+++ mpi-1.8.6/mpi.c 2011-12-10 19:43:09.000000000 -0800
+--- mpi-1.8.6.orig/mpi.c 2011-12-10 19:43:20.000000000 -0800
++++ mpi-1.8.6/mpi.c 2011-12-12 14:31:12.000000000 -0800
+@@ -3255,7 +3255,7 @@
+ unless absolutely necessary.
+ */
+ max = USED(a);
+- w = dp[max - 1] * d;
++ w = dp[max - 1] * (mp_word) d;
+ if(CARRYOUT(w) != 0) {
+ if((res = s_mp_pad(a, max + 1)) != MP_OKAY)
+ return res;
@@ -3263,7 +3263,7 @@
}
diff --git a/mpi-patches/series b/mpi-patches/series
index 65556a57..5a4854d0 100644
--- a/mpi-patches/series
+++ b/mpi-patches/series
@@ -8,3 +8,4 @@ add-mpi-toradix-with-case
fix-mult-bug
mpi-set-mpi-word
mpi-set-double-intptr
+fix-bad-shifts