rt-thread/components/dfs/dfs_v2/filesystems
Shell 5f947863b4
[dfsv2] fixup out-of-memory access (#8973)
This change addresses a potential out-of-memory access issue in the
devfs filesystem component. The issue arises when the `rt_malloc`
function allocates memory for a path string without accounting for
the null terminator, leading to undefined behavior.

As the manual documented:

> DESCRIPTION
>   The strlen() function calculates the length of the string pointed to
>   by s, excluding the terminating null byte ('\0').

To fix this, the memory allocation size was increased by one byte
to ensure space for the null terminator. This prevents potential
out-of-memory access and ensures proper string termination.

Signed-off-by: Shell <smokewood@qq.com>
2024-05-21 19:45:08 +08:00
..
cromfs feat(dfs_v2/cromfs): add cromfs mmap (#8218) 2023-11-02 20:12:20 +08:00
devfs [dfsv2] fixup out-of-memory access (#8973) 2024-05-21 19:45:08 +08:00
elmfat [clang-format] 增加clang-format格式化配置,通过ide或者手动运行tools/run-clang-format.py进行代码自动格式化 2024-04-21 01:18:37 -04:00
mqueue sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
ptyfs sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
ramfs [DFS] prepare for dfs_v2.0 (#7200) 2023-04-08 22:25:51 +08:00
romfs sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
skeleton [dfs] Add DFS v2.0 (#7606) 2023-06-10 21:35:25 +08:00
tmpfs sync smart & dfs (#8672) 2024-03-28 23:42:56 +08:00
.ignore_format.yml [DFS] add Kconfig for dfs-v2.0 (#7156) 2023-04-04 15:02:56 +08:00
SConscript [DFS] add Kconfig for dfs-v2.0 (#7156) 2023-04-04 15:02:56 +08:00