nuttx/libs/libc
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
..
aio libs/libc: There is no need to use sched_[un]lock 2024-10-12 13:28:23 +08:00
assert libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
audio libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
bin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
builtin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
ctype libcxx: fix compile error 2024-10-23 09:42:57 +08:00
dirent cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
dlfcn nuttx/libc:Add _dl_find_object and dl_iterate_phdr function. 2024-10-15 12:35:54 +08:00
errno libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
eventfd libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
fdt libs/libc/fdt/Make.defs: cannot move due to directory not empty bugfix 2024-10-09 15:42:17 +08:00
fixedmath libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
gdbstub gdbstub:fix typo 2024-10-24 08:45:21 +08:00
gnssutils libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
grp libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
hex2bin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
inttypes libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
kbin libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
libgen libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
locale cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
lzf libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
machine nuttx: Add LIBSUPCXX_TOOLCHAIN to link the prebuilt library provide by toolchain. 2024-10-24 01:38:03 +08:00
misc libs/misc/memoryregion: remove unused memory_region 2024-10-18 21:32:48 +08:00
modlib modlib/modlib_symbols.c: Fix usage of void* arithmetics 2024-10-17 22:54:33 +08:00
net cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
netdb cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
obstack libs/libc/obstack: fix allocated chunk overrun due to invalid limit 2024-10-30 11:53:18 -03:00
pthread cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
pwd libs/libc/unistd: add getspnam function 2024-10-16 11:15:25 +08:00
queue libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
regex libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sched libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
search libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
semaphore nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling via syscall 2024-10-12 09:50:54 +08:00
signal cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
spawn cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
stdio Discourage the use of LIBC_PRINT_EXTENSION 2024-10-17 18:08:23 +08:00
stdlib libc: Fix lib_arc4random.c:111:(.text.arc4random_buf+0x26): undefined reference to `clock_systime_ticks' 2024-10-28 09:23:19 +01:00
stream driver/serial: remove return value of up_putc() 2024-10-26 13:21:29 +08:00
string Revert "libc/lib_bzero:Add bzero prototype." 2024-10-23 10:08:23 +08:00
symtab lib_libvsprintf.c:add option in Kconfig to control "%p*" special format specifier. 2024-10-15 15:33:13 +08:00
syslog syslog: support syslog redirection to sched_note 2024-10-11 01:30:11 +08:00
termios libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
time strptime.c:len is not defined. 2024-10-16 17:02:51 +08:00
tls libc: Add debug assert to prevent tls allocation failure 2024-10-18 21:34:18 +08:00
uio move readv/writev to the kernel 2024-10-30 17:07:54 +08:00
unistd libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
userfs libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
uuid libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
wchar libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
wctype libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
wqueue cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
zoneinfo libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
.gitignore libfdt: modify makefile 2023-08-26 17:07:02 +08:00
CMakeLists.txt libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
Kconfig nuttx/uorb: Rename GPS to GNSS 2024-09-19 03:44:49 +08:00
libc.csv libc: Refine the arc4random_buf implementation 2024-10-26 18:04:21 -03:00
libc.h libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
Makefile libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00