Skip to content
Commit 4188fc31 authored by nir@lichtman.org's avatar nir@lichtman.org Committed by Kees Cook
Browse files

exec: move warning of null argv to be next to the relevant code



Problem: The warning is currently printed where it is detected that the
arg count is zero but the action is only taken place later in the flow
even though the warning is written as if the action is taken place in
the time of print

This could be problematic since there could be a failure between the
print and the code that takes action which would deem this warning
misleading

Solution: Move the warning print after the action of adding an empty
string as the first argument is successful

Signed-off-by: default avatarNir Lichtman <nir@lichtman.org>
Link: https://lore.kernel.org/r/ZyYUgiPc8A8i_3FH@nirs-laptop

.
Signed-off-by: default avatarKees Cook <kees@kernel.org>
parent b6709dcd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment