changeset 338:1c7a072000e0

BUG: mp_div_2d returns status and it isn't checked. FIX: Check and return status. From Erik Hovland
author Matt Johnston <matt@ucc.asn.au>
date Fri, 07 Jul 2006 06:43:55 +0000
parents bfa09e369e0e
children 31743c9bdf78
files libtommath/bn_mp_div.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libtommath/bn_mp_div.c	Mon Jun 12 16:05:09 2006 +0000
+++ b/libtommath/bn_mp_div.c	Fri Jul 07 06:43:55 2006 +0000
@@ -269,7 +269,9 @@
   }
 
   if (d != NULL) {
-    mp_div_2d (&x, norm, &x, NULL);
+    if ((res = mp_div_2d (&x, norm, &x, NULL)) != MP_OKAY) {
+		goto LBL_Y;
+	}
     mp_exch (&x, d);
   }