diff options
| author | Shell <[email protected]> | 2024-05-21 19:45:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-21 19:45:08 +0800 |
| commit | 5f947863b4358ba437878747072bc372cb1e855e (patch) | |
| tree | 0cf5e490e9cfab24c6e5008763285ac4de4092ff /src/SConscript | |
| parent | 6101f1fd29374ac69c107e3cfeadfa06b0c901f9 (diff) | |
[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 <[email protected]>
Diffstat (limited to 'src/SConscript')
0 files changed, 0 insertions, 0 deletions
