[U-Boot] printenv show garbage on out-of-memory conditions

Tom Rini trini at ti.com
Wed Apr 17 17:36:40 CEST 2013


On Fri, Sep 28, 2012 at 05:00:13AM -0000, Maxime Larocque wrote:

> Hello,
> 
> 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.

Applied to u-boot/master, with some minor fixups for application.
Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130417/a2d01fdd/attachment.pgp>


More information about the U-Boot mailing list