]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
printenv: Correct out-of-memory condition check.
authorMaxime Larocque <maxmtl2002@yahoo.ca>
Fri, 28 Sep 2012 05:00:13 +0000 (05:00 +0000)
committerTom Rini <trini@ti.com>
Wed, 17 Apr 2013 14:58:14 +0000 (10:58 -0400)
commit22a4a6c5c2ea4c5998b98e6358b351848f2b765f
tree73e38e30134e12ea0e8b913e0ec653351c835aa4
parent314dd4fecc87175f6e79eb977966fb60b33c543c
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: Maxime Larocque <maxmtl2002@yahoo.ca>
common/cmd_nvedit.c