acadia-newlib/winsup/cygwin
Corinna Vinschen aa106b29a6 malloc/nano-malloc: correctly check for out-of-bounds allocation reqs
The overflow check in mEMALIGn erroneously checks for INT_MAX,
albeit the input parameter is size_t.  Fix this to check for
__SIZE_MAX__ instead.  Also, it misses to check the req against
adding the alignment before calling mALLOc.

While at it, add out-of-bounds checks to pvALLOc, nano_memalign,
nano_valloc, and Cygwin's (unused) dlpvalloc.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-11-17 10:52:34 +01:00
..
include Cygwin: Add C11 threads API 2020-08-30 14:27:43 +02:00
lib Cygwin: update C++ dialect to gnu++14 2020-05-30 19:41:18 +02:00
libc Cygwin: mtx_init: drop glibc workaround 2020-09-01 12:46:15 +02:00
math Cygwin: fix return value of sqrtl on negative infinity 2020-10-27 10:23:27 -04:00
regex Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
release Cygwin: fix return value of sqrtl on negative infinity 2020-10-27 10:23:27 -04:00
tzcode libc/time: Move internal newlib tz-structs into own header 2020-10-15 16:59:51 +02:00
DevNotes
Makefile.in Cygwin: Drop passing '-c' compiler flag into gentls_offsets 2020-11-02 16:49:03 +00:00
ROADMAP
aclocal.m4 Cygwin: Remove --with-windows-{libs,headers} 2020-10-18 14:55:14 +01:00
advapi32.cc
aio.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
analyze_sigfe
assert.cc
autogen.sh Cygwin: Use aclocal option --system-acdir rather than --acdir 2020-10-18 14:55:15 +01:00
autoload.cc Cygwin: memory: declare extended memory API 2020-04-07 17:42:02 +02:00
automode.c
binmode.c
child_info.h Cygwin: sigproc: Allow more child processes per process 2020-08-28 15:22:58 +02:00
clock.cc
clock.h
collate.h
common.din Cygwin: Add C11 threads API 2020-08-30 14:27:43 +02:00
config.h.in
configure Cygwin: Drop autoconf variable all_host 2020-11-02 16:49:00 +00:00
configure.ac Cygwin: Drop autoconf variable all_host 2020-11-02 16:49:00 +00:00
cpuid.h
crt0.c Cygwin: 32 bit: remove old code to 16 bit align stack 2020-02-28 15:02:09 +01:00
ctype.cc
cxx.cc
cygerrno.h
cygheap.cc Cygwin: fix formatting: collapse whitespace-only lines 2020-03-11 13:45:58 +01:00
cygheap.h
cygheap_malloc.h
cyglsa.h
cygmagic
cygmalloc.h
cygserver.h Cygwin: cygserver: drop useless packed attribute 2020-02-26 20:55:14 +01:00
cygserver_ipc.h
cygserver_msg.h
cygserver_pwdgrp.h Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
cygserver_sem.h
cygserver_setpwd.h
cygserver_shm.h
cygthread.cc
cygthread.h
cygtls.cc
cygtls.h
cygtls_padsize.h
cygwait.cc
cygwait.h
cygwin-cxx.h
cygwin-shilka
cygwin.ldif
cygwin.sc.in
cygwin_version.h
cygxdr.cc
cygxdr.h
dcrt0.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
debug.cc
debug.h
devices.cc
devices.h
devices.in
dir.cc Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
dlfcn.cc
dll_init.cc
dll_init.h
dllfixdbg
dtable.cc Cygwin: pty: Implement new pseudo console support. 2020-08-22 13:43:49 +02:00
dtable.h
environ.cc
environ.h
errno.cc
exception.h
exceptions.cc Cygwin: Remove waitloop argument from try_to_debug() 2020-08-30 16:24:47 +01:00
exec.cc
external.cc Cygwin: fix formatting: collapse whitespace-only lines 2020-03-11 13:45:58 +01:00
fcntl.cc Cygwin: fix formatting: collapse whitespace-only lines 2020-03-11 13:45:58 +01:00
fenv.cc
fhandler.cc Cygwin: AF_UNIX: use FILE_OPEN_REPARSE_POINT when needed 2020-10-04 12:53:04 -04:00
fhandler.h Cygwin: fhandler_fifo: reduce size 2020-11-09 08:47:29 -05:00
fhandler_clipboard.cc
fhandler_console.cc Cygwin: avoid GCC 10 error with -Werror=narrowing 2020-09-28 14:11:26 +01:00
fhandler_cygdrive.cc
fhandler_dev.cc
fhandler_disk_file.cc Cygwin: drop internal O_NOSYMLINK and O_DIROPEN flags 2020-09-07 22:45:56 +02:00
fhandler_dsp.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
fhandler_fifo.cc Cygwin: fhandler_fifo: reduce size 2020-11-09 08:47:29 -05:00
fhandler_floppy.cc Cygwin: raw disk I/O: lock floppys as well 2020-04-24 16:22:26 +02:00
fhandler_netdrive.cc Cygwin: fix formatting: collapse whitespace-only lines 2020-03-11 13:45:58 +01:00
fhandler_nodevice.cc
fhandler_pipe.cc
fhandler_proc.cc format_proc_cpuinfo: add enqcmd cpuinfo flag 2020-10-13 18:14:02 +02:00
fhandler_process.cc Cygwin: format_process_fd: add directory check 2020-09-08 14:58:18 -04:00
fhandler_process_fd.cc
fhandler_procnet.cc Cygwin: drop internal O_NOSYMLINK and O_DIROPEN flags 2020-09-07 22:45:56 +02:00
fhandler_procsys.cc
fhandler_procsysvipc.cc Cygwin: drop internal O_NOSYMLINK and O_DIROPEN flags 2020-09-07 22:45:56 +02:00
fhandler_random.cc
fhandler_raw.cc
fhandler_registry.cc Cygwin: drop internal O_NOSYMLINK and O_DIROPEN flags 2020-09-07 22:45:56 +02:00
fhandler_serial.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
fhandler_signalfd.cc
fhandler_socket.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
fhandler_socket_inet.cc Cygwin: AF_INET and AF_LOCAL: recv_internal: fix MSG_WAITALL support 2020-10-23 08:23:27 -04:00
fhandler_socket_local.cc Cygwin: AF_INET and AF_LOCAL: recv_internal: fix MSG_WAITALL support 2020-10-23 08:23:27 -04:00
fhandler_socket_unix.cc Cygwin: AF_UNIX: open_pipe: call recv_peer_info 2020-10-04 12:53:05 -04:00
fhandler_tape.cc
fhandler_termios.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
fhandler_timerfd.cc
fhandler_tty.cc Cygwin: pty: Disable ResizePseudoConsole() if stdout is redirected. 2020-10-27 10:03:42 +01:00
fhandler_virtual.cc Cygwin: drop internal O_NOSYMLINK and O_DIROPEN flags 2020-09-07 22:45:56 +02:00
fhandler_virtual.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
fhandler_windows.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
fhandler_zero.cc
flock.cc Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
fork.cc Cygwin: drop PROC_DETACHED_CHILD flag 2020-08-28 11:10:48 +02:00
forkable.cc
gcc_seh.h Cygwin: add header defining GCC exception codes 2020-08-20 10:46:23 -04:00
gcrt0.c
gendef
gendevices
gentls_offsets Cygwin: Remove ccwrap 2020-10-18 14:55:13 +01:00
glob.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
glob_pattern_p.cc
globals.cc
gmon.c
gmon.h
grp.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
heap.cc
heap.h
hookapi.cc Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
how-autoload-works.txt
how-cygheap-works.txt
how-cygtls-works.txt
how-fhandlers-work.txt
how-signals-work.txt
how-spawn-works.txt
how-startup-shutdown-works.txt
how-to-debug-cygwin.txt
i686.din
init.cc Cygwin: 32 bit: remove old code to 16 bit align stack 2020-02-28 15:02:09 +01:00
ioctl.cc
ipc.cc
kernel32.cc
lc_era.h
lc_msg.h
ldap.cc
ldap.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
libstdcxx_wrapper.cc Cygwin: update C++ dialect to gnu++14 2020-05-30 19:41:18 +02:00
loadavg.cc
loadavg.h
lsearch.cc
malloc.cc malloc/nano-malloc: correctly check for out-of-bounds allocation reqs 2020-11-17 10:52:34 +01:00
malloc_wrapper.cc Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
math.h
mcount.c
mcountFunc.S
miscfuncs.cc Cygwin: threads: use extended memory API if available 2020-04-07 18:23:11 +02:00
miscfuncs.h Cygwin: fix formatting: collapse whitespace-only lines 2020-03-11 13:45:58 +01:00
mkglobals_h
mkimport
mktemp.cc
mkvers.sh
mmap.cc Cygwin: mmap: Remove AT_ROUND_TO_PAGE workaround 2020-07-22 10:51:27 +02:00
mmap_alloc.cc Cygwin: mmap_alloc: fix comment to document using the extended memory API 2020-04-07 18:23:11 +02:00
mmap_alloc.h
mmap_helper.h
mount.cc
mount.h
msg.cc
mtinfo.h
net.cc Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
netdb.cc
nfs.cc
nfs.h
nlsfuncs.cc Cygwin: pty: move codepage evaluation to nlsfuncs.cc 2020-09-08 10:36:04 +02:00
ntdll.h Cygwin: avoid GCC 10 error with -Werror=narrowing 2020-09-28 14:11:27 +01:00
ntea.cc Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
ntsecapi.h
passwd.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
path.cc Cygwin: always recognize AF_UNIX sockets as reparse points 2020-10-04 12:53:05 -04:00
path.h Cygwin: path_conv::eq_worker: add NULL pointer checks 2020-11-16 08:15:31 -05:00
pathfinder.h
perprocess.h
pinfo.cc
pinfo.h Cygwin: drop PROC_DETACHED_CHILD flag 2020-08-28 11:10:48 +02:00
poll.cc
posix_ipc.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
posix_timer.cc Cygwin: posix timers: fix uninitialized variable 2020-02-26 16:59:56 +01:00
posix_timer.h
profil.c
profil.h
pseudo-reloc.cc Cygwin: avoid GCC 10 error with -Werror=narrowing 2020-09-28 14:11:27 +01:00
pthread.cc
pwdgrp.h Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
quotactl.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
random.cc
registry.cc
registry.h
regparm.h
resource.cc
scandir.cc
sched.cc Cygwin: make pthread_yield available for internal usage 2020-08-30 14:27:43 +02:00
sec_acl.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
sec_auth.cc
sec_helper.cc Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
sec_posixacl.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
sec_posixacl.h Fix invalid acl_entry_t on 32-bit Cygwin 2020-07-10 10:29:47 +02:00
security.cc Cygwin: AF_UNIX: use FILE_OPEN_REPARSE_POINT when needed 2020-10-04 12:53:04 -04:00
security.h Cygwin: fix formatting: collapse whitespace-only lines 2020-03-11 13:45:58 +01:00
select.cc Cygwin: select: Fix a bug on closing pi->bye event. 2020-08-28 15:24:22 +02:00
select.h Cygwin: serial: use per call OVERLAPPED structs 2020-03-23 21:06:03 +01:00
sem.cc
setlsapwd.cc
shared.cc
shared_info.h
shm.cc
signal.cc
sigproc.cc Cygwin: sigproc.cc: add comment 2020-08-30 09:33:30 -04:00
sigproc.h Cygwin: drop PROC_DETACHED_CHILD flag 2020-08-28 11:10:48 +02:00
smallprint.cc Cygwin: pty: Implement new pseudo console support. 2020-08-22 13:43:49 +02:00
sortdin
spawn.cc Cygwin: pty: Disable pseudo console if TERM does not have CSI6n. 2020-08-31 12:07:09 +02:00
speclib
spinlock.h
strace.cc Cygwin: pty: Implement new pseudo console support. 2020-08-22 13:43:49 +02:00
strfuncs.cc Cygwin: convert sys_wcstombs/sys_mbstowcs wrapper to inline functions 2020-07-10 10:29:33 +02:00
string.h
strsep.cc
strsig.cc
sync.cc
sync.h
syscalls.cc
sysconf.cc Cygwin: Fix missing breaks in switch statement 2020-08-05 21:46:53 +02:00
syslog.cc
termios.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
textmode.c
textreadmode.c
thread.cc Cygwin: pthreads: iterate over key destructors per POSIX 2020-08-30 14:27:43 +02:00
thread.h Cygwin: pthreads: iterate over key destructors per POSIX 2020-08-30 14:27:43 +02:00
timerfd.cc
timerfd.h
times.cc Cygwin: fix formatting: drop spaces leading tabs 2020-03-11 13:45:58 +01:00
tls_pbuf.cc
tls_pbuf.h Cygwin: fix formatting: drop trailing whitespace 2020-03-11 13:45:58 +01:00
tlsoffsets.h
tlsoffsets64.h
tty.cc Cygwin: pty: Disable ResizePseudoConsole() if stdout is redirected. 2020-10-27 10:03:42 +01:00
tty.h Cygwin: pty: Disable ResizePseudoConsole() if stdout is redirected. 2020-10-27 10:03:42 +01:00
uinfo.cc Cygwin: Add 'fallthrough' pseudo keyword for switch/case use 2020-08-05 21:58:22 +02:00
uname.cc
update-copyright
userinfo.h
vstrlist.h
wait.cc
wchar.h Cygwin: convert sys_wcstombs/sys_mbstowcs wrapper to inline functions 2020-07-10 10:29:33 +02:00
wincap.cc Cygwin: tcp: Support TCP_USER_TIMEOUT 2020-07-01 20:30:52 +02:00
wincap.h Cygwin: tcp: Support TCP_USER_TIMEOUT 2020-07-01 20:30:52 +02:00
window.cc
winf.cc
winf.h
wininfo.h
winlean.h Cygwin: winlean.h: remove most of the extended memory API 2020-09-24 12:28:03 -04:00
winsup.h Cygwin: Remove waitloop argument from try_to_debug() 2020-08-30 16:24:47 +01:00
winver.rc
x86_64.din