acadia-newlib/newlib/libc
Keith Packard c51f05c597 string: Fix buffer overrun in picolibc/newlib/libc/string/strrchr.c (#184)
Reported by prodisDown:

	In picolibc/newlib/libc/string/strrchr.c

	if (i) { while ((s=strchr(s, i))) { last = s; s++; } } else { last = strchr(s, i); }

	Value (for example 0xFFFFFF00) in if (i) can pass test and
	then be typecasted to char inside strchr(). Then s++ and then
	buffer overrun.

	It can be fixed by preventive typecast i = (int) (char) i; or
	typecasting inside expression if ((char) i).

Fixed by casting to char.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-10-13 16:39:49 -04:00
..
argz Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
ctype fix and amend scripts and makefile rules to generate Unicode data 2021-07-06 15:35:37 +02:00
errno Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
iconv Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
include sys/tree.h: Red child with black sibling rotations 2021-10-07 17:58:36 +02:00
locale Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
machine libgloss/newlib: rename configure.in to configure.ac 2021-09-13 10:14:37 -04:00
misc Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
posix nftw: fix thread cancellation support 2021-09-03 12:26:17 +02:00
reent Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
search Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
signal newlib: sig2str: use __restrict 2021-09-15 10:08:20 -04:00
ssp Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
stdio svfwscanf: Simplify _sungetwc_r to eliminate apparent buffer overflow 2021-08-18 10:37:24 +02:00
stdio64 Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
stdlib nano-malloc: Fix redefined compilation warning 2021-09-06 20:29:39 +02:00
string string: Fix buffer overrun in picolibc/newlib/libc/string/strrchr.c (#184) 2021-10-13 16:39:49 -04:00
sys libgloss/newlib: rename configure.in to configure.ac 2021-09-13 10:14:37 -04:00
syscalls Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
time Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
unix Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
xdr Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
Makefile.am
Makefile.in Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
Makefile.unidata fix and amend scripts and makefile rules to generate Unicode data 2021-07-06 15:35:37 +02:00
aclocal.m4
configure Add build mechanism to share common header files between machines 2021-04-13 12:55:33 +02:00
configure.ac libgloss/newlib: rename configure.in to configure.ac 2021-09-13 10:14:37 -04:00
libc.in.xml
libc.texinfo
saber Remove matherr, and SVID and X/Open math library configurations 2019-01-23 10:46:24 +01:00
sys.tex