Re: [U-Boot] [PATCH] x86: zImage: avoid potential NULL dereference

2017-04-15 Thread Tom Rini
On Sat, Apr 15, 2017 at 06:30:21PM +0200, Heinrich Schuchardt wrote: > On 04/15/2017 06:12 PM, Tom Rini wrote: > > On Sat, Apr 15, 2017 at 03:58:55PM +0200, Heinrich Schuchardt wrote: > > > >> If bootargs is not assigned getenv("bootargs") will > >> return NULL. > >> Some part of the code is check

Re: [U-Boot] [PATCH] x86: zImage: avoid potential NULL dereference

2017-04-15 Thread Heinrich Schuchardt
On 04/15/2017 06:12 PM, Tom Rini wrote: > On Sat, Apr 15, 2017 at 03:58:55PM +0200, Heinrich Schuchardt wrote: > >> If bootargs is not assigned getenv("bootargs") will >> return NULL. >> Some part of the code is checking for this condition. >> Other parts dereference a possible NULL pointer. >> >>

Re: [U-Boot] [PATCH] x86: zImage: avoid potential NULL dereference

2017-04-15 Thread Tom Rini
On Sat, Apr 15, 2017 at 03:58:55PM +0200, Heinrich Schuchardt wrote: > If bootargs is not assigned getenv("bootargs") will > return NULL. > Some part of the code is checking for this condition. > Other parts dereference a possible NULL pointer. > > The problem was indicated by cppcheck. > > Sign

[U-Boot] [PATCH] x86: zImage: avoid potential NULL dereference

2017-04-15 Thread Heinrich Schuchardt
If bootargs is not assigned getenv("bootargs") will return NULL. Some part of the code is checking for this condition. Other parts dereference a possible NULL pointer. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt --- arch/x86/lib/zimage.c | 9 + 1 file chang