From 4d55b4e596d63705b86200d15d905b2549dd25df Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Wed, 2 Jan 2013 11:33:11 +0530 Subject: Add assert for potential access beyond array bounds in m1np The mpexp code has an access into m1np: for (i=n-1; i>0; i--,n--) { if (m1np[i][p]+m2>0) break; } which could break for p >= 18 or i >= 7. Fortunately this code is never called due to the way the exp function is implemented since values having exponent less than -55 return 1.0. Make sure that if it gets called in future, it is trapped. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index fe304e41a9..d0c10b5ff2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-01-02 Siddhesh Poyarekar + * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Add assert to + check access beyond bounds of m1np. + * sysdeps/ieee754/dbl-64/mpa.c [! NO__CONST]: New constant MPTWO. (__inv): Remove local variable MPTWO to use the global -- cgit 1.4.1