diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-09-27 13:06:39 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-09-27 13:06:39 +0000 |
commit | 4d8ae284b4494e1ace369056e66527a37c8c847d (patch) | |
tree | 598f4b50f9ace03d4e615b2614acebf2e0053011 /sub.c | |
parent | fe9cfe171148047c14c7b07a1e3965f788d01e31 (diff) | |
download | mpfr-4d8ae284b4494e1ace369056e66527a37c8c847d.tar.gz |
fixed Array Bound Write
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@755 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sub.c')
-rw-r--r-- | sub.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -247,7 +247,7 @@ mpfr_sub1(a, b, c, rnd_mode, diff_exp) if (k>an) ap[an-1] += cp[cn-k+an]<<(BITS_PER_MP_LIMB-dif); } else if (dif<0) { - cc = mpn_lshift(ap, cp+(cn-k), k, -dif); + cc = mpn_lshift(ap, cp+(cn-k), (k<=an) ? k : an, -dif); if (k<an) ap[k]=cc; /* put the non-significant bits in low limb for further rounding */ if (cn >= k+1) |