diff options
author | Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> | 2018-01-31 09:56:48 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-01 02:45:10 +0300 |
commit | 87c7fb396a59d3e2be434cc956462ba46451193b (patch) | |
tree | b4b6f06e614e702c6283b2e57d4c7ea9128086e5 /env | |
parent | 48f58a59737739b0f96ceba9f7873178c6d917bf (diff) | |
download | u-boot-87c7fb396a59d3e2be434cc956462ba46451193b.tar.xz |
cmd: nvedit: env_get_f must check for env_get_char error codes
env_get_f calls env_get_char to load single characters from the
environment. However, the return value of env_get_char was not
checked for errors. Now if the env driver does not support the
.get_char call, env_get_f did not notice this and looped over the
whole size of the environment, calling env_get_char over 8000
times with the default settings, just to return an error in the
end.
Fix this by checking if env_get_char returns < 0.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'env')
0 files changed, 0 insertions, 0 deletions