Skip to content
Snippets Groups Projects
Commit 22a4a6c5 authored by Maxime Larocque's avatar Maxime Larocque Committed by Tom Rini
Browse files

printenv: Correct out-of-memory condition check.


In common/cmd_nvedit.c, en env_print(), the wrong type is used for len.
hexport_r() returns -1 on error (like OOM), which is converted to
0xffffffff when put in an unsigned. Said value is obviously bigger then
0, and as a result an uninitialized string is then displayed. Other
usages of hexport_r() in the code correctly uses ssize_t to keep its
return value.

Signed-off-by: default avatarMaxime Larocque <maxmtl2002@yahoo.ca>
parent 314dd4fe
No related branches found
No related tags found
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