summaryrefslogtreecommitdiffhomepage
path: root/libtommath
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-07-07 06:43:55 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-07-07 06:43:55 +0000
commit934a6d417dba64d88e317fdcf7f794510f727fca (patch)
tree8ff6838c79191285fa5dc996aa3b8f4a86f14c95 /libtommath
parentd6ee29f5ae89934ec400b310db316a6543f8b87e (diff)
BUG: mp_div_2d returns status and it isn't checked.
FIX: Check and return status. From Erik Hovland --HG-- extra : convert_revision : 5ffd8cbe12baca17918527c8e8e626600849ad10
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/bn_mp_div.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libtommath/bn_mp_div.c b/libtommath/bn_mp_div.c
index 6b2b8f0..6e1e0fb 100644
--- a/libtommath/bn_mp_div.c
+++ b/libtommath/bn_mp_div.c
@@ -269,7 +269,9 @@ int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
}
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);
}