nuttx/libs/libc
Michal Lenc 1e1185c63e libs/libc/obstack/lib_obstack_free.c: fix object check within chunk
The original condition incorrectly used &h->chunk instead of
h->chunk in the calculation whether the object is in the chunk. This
could lead to the wrong behavior as the first branch gave incorrect
result and thus sometimes the entire obstack was freed even though
object was not NULL.

The commit also simplifies the logic, we can use pointer arithmetic
here and just do h->chunk + 1 as it gives the same result as
(FAR char *)h->chunk + sizeof(struct _obstack_chunk). This saves
unnecessary cast and sizeof.

The second branch should be less than or equal, not just less than.
This ensures the object is correctly located in the chunk even after
previous obstack_finish was called.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Co-authored-by: Karel Kočí <kkoci@elektroline.cz>
2025-12-23 10:28:25 +08:00
..
aio
assert
audio
builtin
ctype
dirent
dlfcn
elf libc/libelf:fix bug for libelf_symname 2025-12-23 10:27:15 +08:00
errno
eventfd
fdt
fixedmath
gdbstub
gnssutils libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
grp
hex2bin
inttypes
libgen
locale style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
lzf
machine libs/libc/arm: add back __aeabi_mem* functions 2025-11-28 14:50:58 -03:00
misc libc/crc: Add crc8rohcincr for incremental CRC8 ROHC calculation 2025-09-30 17:30:46 -03:00
net
netdb style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
obstack libs/libc/obstack/lib_obstack_free.c: fix object check within chunk 2025-12-23 10:28:25 +08:00
pthread libc/pthread/pthread_keydelete.c: reset key value 2025-10-01 12:00:43 +08:00
pwd
queue
regex
sched
search
semaphore sched/semaphore: add support to customize semaphore max allowed value 2025-09-04 09:48:34 +08:00
signal sched/signal: Fix nxsig_ismember() return value behavior 2025-11-25 10:02:52 +08:00
spawn
stdio libc/fclose: Validate the user provided stream pointer 2025-09-09 23:51:35 +08:00
stdlib libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
stream libc: lib_bsprintf reuse var instead value for string 2025-06-20 09:48:39 +08:00
string libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
symtab
syslog
termios
time
tls
uio
unistd libc/unistd: Replace pipe() macro with proper function implementation 2025-11-26 17:18:13 +08:00
userfs style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
uuid
wchar
wctype
wqueue
zoneinfo
.gitignore
CMakeLists.txt
Kconfig
libc.csv libc/unistd: Replace pipe() macro with proper function implementation 2025-11-26 17:18:13 +08:00
libc.h
Makefile