diff libtommath/bn_mp_div.c @ 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 eed26cff980b
children 5ff8218bcee9
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);
   }