diff options
author | Matt Johnston <matt@ucc.asn.au> | 2006-07-07 06:43:55 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2006-07-07 06:43:55 +0000 |
commit | 934a6d417dba64d88e317fdcf7f794510f727fca (patch) | |
tree | 8ff6838c79191285fa5dc996aa3b8f4a86f14c95 /libtommath | |
parent | d6ee29f5ae89934ec400b310db316a6543f8b87e (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.c | 4 |
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); } |