# HG changeset patch # User Matt Johnston # Date 1152254635 0 # Node ID 1c7a072000e0f74369d837c9b44467039568d3dc # Parent bfa09e369e0eb6f5b5ecf782ef62838eab1508be BUG: mp_div_2d returns status and it isn't checked. FIX: Check and return status. From Erik Hovland diff -r bfa09e369e0e -r 1c7a072000e0 libtommath/bn_mp_div.c --- 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); }