diff options
author | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 1999-06-24 12:22:57 +0000 |
---|---|---|
committer | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 1999-06-24 12:22:57 +0000 |
commit | 0f385cb8314dca738841506c8b0cede45309d6d7 (patch) | |
tree | 9b074c0ed53f8b4baed0413692c19d12e22e8f37 /sub.c | |
parent | 20a671c7976066356dbfc4ba356c58aac85df938 (diff) | |
download | mpfr-0f385cb8314dca738841506c8b0cede45309d6d7.tar.gz |
Patched an Array Bound Read.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@165 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sub.c')
-rw-r--r-- | sub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -217,7 +217,8 @@ ck(ap, k, 11); cc = mpn_lshift(ap, cp+(cn-k), k, -dif); if (k<an) { ck(ap+k, 1, 12); ap[k]=cc; } /* put the non-significant bits in low limb for further rounding */ - ap[0] += cp[cn-k-1]>>(mp_bits_per_limb+dif); + if (cn >= k+1) + ap[0] += cp[cn-k-1]>>(mp_bits_per_limb+dif); } else { ck(ap, k, 13); MPN_COPY(ap, cp+(cn-k), k); } overlap=1; |