diff options
| author | Marek Vasut <[email protected]> | 2025-12-17 20:57:38 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-18 10:26:22 -0600 |
| commit | 2333d446b7b133ddfb9dea2d53996d560796ecd9 (patch) | |
| tree | e594b88da8784301cf02c4823d396af63f00fdf4 /doc/develop/pytest | |
| parent | d865f2f0162b1121f271bd3e6c1e3f171036aec9 (diff) | |
cmd: nvedit: Validate argument count before use
Avoid NULL pointer dereference in case 'env select' is invoked
without parameters, check the arg count and make sure it is at
least 2, otherwise print usage.
The crash is easy to trigger e.g. in sandbox:
$ ./u-boot -Tc "env select"
Fixes: a97d22ebba23 ("cmd: env: add env select command")
Signed-off-by: Marek Vasut <[email protected]>
Tested-by: Vincent Stehlé <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'doc/develop/pytest')
0 files changed, 0 insertions, 0 deletions
