commit | ec8568187bd631fa81d6d0162b7930d0507686f4 | [log] [tgz] |
---|---|---|
author | Maxime Larocque <maxmtl2002@yahoo.ca> | Fri Sep 28 05:00:13 2012 +0000 |
committer | Tom Rini <trini@ti.com> | Wed Apr 17 10:58:14 2013 -0400 |
tree | 73e38e30134e12ea0e8b913e0ec653351c835aa4 | |
parent | 12aa04d27dbf2ea087d21195f0312a7127529340 [diff] |
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>