1
0
Fork 0
forked from nuttx/nuttx-update
local-nuttx-update/include
Karel Kočí b851916d76 libs/libc/obstack: fix allocated chunk overrun due to invalid limit
This primarily fixes allocated memory overrun due to invalidly
calculated limit of the chunk. The function here allocates chunk of size
that includes required header. The error was that size of the chunk was
invalidly again added when limit was being calculated. This was causing
memory overrun and issues especially with object growing (reallocation).

The secondary fix here is to the algorithm that rounds the required size
to the multiple of chunk size. In short chunk size must be reduced by
one to get the correct mask. The condition that was generating the mask
was also invalid because it must perform shift with at most one less
than number of bits (not bytes).
2024-10-30 11:53:18 -03:00
..
android include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
arpa include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
crypto include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
cxx include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
net add a flag of lin internal sleep/wakeup state 2024-10-16 14:33:59 +08:00
netinet arp.h: make struct arpreq four-byte aligned 2024-10-30 21:10:46 +08:00
netpacket net/rpmsg: use hash to handle rp_name 2024-10-13 11:33:04 +08:00
nuttx nuttx/atomic.h:Add use condition for using stdatomic.h 2024-10-30 21:29:04 +08:00
ssp include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
sys move readv/writev to the kernel 2024-10-30 17:07:54 +08:00
.gitignore include/.gitignore: add openlibm to gitignore 2024-10-13 02:27:28 +08:00
aio.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
alloca.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
assert.h assert: add header files to resolve compile failed 2024-10-12 09:29:37 +08:00
byteswap.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
ctype.h libcxx: fix compile error 2024-10-23 09:42:57 +08:00
debug.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
dirent.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
dlfcn.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
dsp.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
dspb16.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
elf.h modlib:Standardized module loading method 2024-10-05 15:22:02 +08:00
elf32.h modlib:Standardized module loading method 2024-10-05 15:22:02 +08:00
elf64.h modlib:Standardized module loading method 2024-10-05 15:22:02 +08:00
endian.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
err.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
errno.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
execinfo.h sched: support backtrace record 2024-10-11 00:37:27 +08:00
fcntl.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
fixedmath.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
fnmatch.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
ftw.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
getopt.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
glob.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
grp.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
hex2bin.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
iconv.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
ifaddrs.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
inttypes.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
iso646.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
langinfo.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
libgen.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
libintl.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
limits.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
locale.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
lzf.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
malloc.h memdump: add dump for the orphan nodes(neighbor of free node) 2024-10-08 23:55:59 +08:00
mqueue.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
netdb.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
nl_types.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
nxflat.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
obstack.h libs/libc/obstack: fix allocated chunk overrun due to invalid limit 2024-10-30 11:53:18 -03:00
poll.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
pthread.h Revert "pthread: We should not directly include arch/spinlock.h as it may cause compilation errors in C++." 2024-10-14 17:42:16 +08:00
pty.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
pwd.h libs/libc/pwd: add new member to passwd struct 2024-10-16 11:15:25 +08:00
regex.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
resolv.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
sched.h nuttx/include:Modify the CPU_SET series macro definition in sched.h 2024-10-15 21:05:36 +08:00
search.h hcreate: add alloc/free func hook for user to deallocate memory 2024-08-22 20:25:30 +08:00
semaphore.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
shadow.h libs/libc/unistd: add getspnam function 2024-10-16 11:15:25 +08:00
signal.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
spawn.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
stdbool.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
stddef.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
stdint.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
stdio.h libc: add nx_strdup() & nx_strndup() support 2024-10-15 01:16:48 +08:00
stdlib.h libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
stdnoreturn.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
string.h libc: add nx_strdup() & nx_strndup() support 2024-10-15 01:16:48 +08:00
strings.h Revert "libc/lib_bzero:Add bzero prototype." 2024-10-23 10:08:23 +08:00
syscall.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
syslog.h syslog: support syslog redirection to sched_note 2024-10-11 01:30:11 +08:00
termios.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
threads.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
time.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
unistd.h libs/libc/unistd: add crypt function 2024-10-16 11:15:25 +08:00
utime.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
uuid.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
wchar.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00
wctype.h include: migrate to SPDX identifier 2024-10-04 08:18:42 +08:00