diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-03-19 19:26:06 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-22 05:46:47 +0100 |
commit | 1a3d22af2606aceb8e175c318e8632a2030318e4 (patch) | |
tree | 8ac894ddf80e6d337b80d9ac1e39f7879a55db95 /lib/display_options.c | |
parent | 9d5beb677dd65647e9cba299e558306c6c4bc8c1 (diff) | |
download | barebox-1a3d22af2606aceb8e175c318e8632a2030318e4.tar.gz |
glob: use empty globfree when compiling without CONFIG_GLOB
We already return an error code unconditionally when building with
!CONFIG_GLOB. We need to do the same for globfree. Otherwise,
we run risk of corrupting memory.
This issue exists since the code was first added, but it became
more acute with 90cde3b9ff46 ("startup: Execute init scripts in
alphabetical order"), which added a globfree into the shell init.
Configuration without CONFIG_GLOB would from then on experience
memory corruption during startup.
Reported-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/display_options.c')
0 files changed, 0 insertions, 0 deletions