diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-04 20:14:58 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-04 20:14:58 (GMT) |
commit | 587746fd340f7935c895234785d43d0a9752d62f (patch) | |
tree | 69028ff1b9c805dcba8e515177f3003c94291c84 /libtommath/bn_s_mp_mul_digs.c | |
parent | 0ff0a94010dcb27842e2f78515d4cfd9ae70ed26 (diff) | |
download | tcl-587746fd340f7935c895234785d43d0a9752d62f.zip tcl-587746fd340f7935c895234785d43d0a9752d62f.tar.gz tcl-587746fd340f7935c895234785d43d0a9752d62f.tar.bz2 |
libtommath -> version 1.2.1
Diffstat (limited to 'libtommath/bn_s_mp_mul_digs.c')
-rw-r--r-- | libtommath/bn_s_mp_mul_digs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libtommath/bn_s_mp_mul_digs.c b/libtommath/bn_s_mp_mul_digs.c index 64509d4..3682b49 100644 --- a/libtommath/bn_s_mp_mul_digs.c +++ b/libtommath/bn_s_mp_mul_digs.c @@ -16,6 +16,10 @@ mp_err s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) mp_word r; mp_digit tmpx, *tmpt, *tmpy; + if (digs < 0) { + return MP_VAL; + } + /* can we use the fast multiplier? */ if ((digs < MP_WARRAY) && (MP_MIN(a->used, b->used) < MP_MAXFAST)) { |