Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/lib/libm/src
Module Name: src
Committed By: mrg
Date: Tue Aug 8 06:31:18 UTC 2023
Modified Files:
src/lib/libm/src: k_rem_pio2.c k_rem_pio2f.c
Log Message:
avoid uninitialised variable accesses.
if __kernel_rem_pio2() or __kernel_rem_pio2f() are called with "nx" less
than 2, the local variable fq[0] may be accessed uninitialised.
__kernel_rem_pio2() has direct calls with nx = 1, and __kernel_rem_pio2f()
is called with a value starting at 3, but may be decreased to less than 2,
implied by this code , if not actually avoided by the tx[] setup above:
nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */
n = __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);
found by GCC 12.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/k_rem_pio2.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/k_rem_pio2f.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index