Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-23 Thread Heiko Schocher
Hello Ladislav, Sorry for digging into it so late... Am 22.11.2017 um 09:25 schrieb Ladislav Michl: On Wed, Nov 22, 2017 at 09:09:36AM +0100, Wolfgang Denk wrote: Dear Ladislav, In message <2017112121.ryicwv6tyh5rye2e@lenoch> you wrote: diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-22 Thread Ladislav Michl
On Wed, Nov 22, 2017 at 09:09:36AM +0100, Wolfgang Denk wrote: > Dear Ladislav, > > In message <2017112121.ryicwv6tyh5rye2e@lenoch> you wrote: > > > > > > > > diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c > > > > index 4465523d5f..313dee0579 100644 > > > > --- a/fs/ubifs/ubifs.c > > > >

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-22 Thread Wolfgang Denk
Dear Ladislav, In message <2017112121.ryicwv6tyh5rye2e@lenoch> you wrote: > > > > > > diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c > > > index 4465523d5f..313dee0579 100644 > > > --- a/fs/ubifs/ubifs.c > > > +++ b/fs/ubifs/ubifs.c > > > @@ -403,8 +403,7 @@ static int ubifs_finddir(struct

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Ladislav Michl
On Tue, Nov 21, 2017 at 10:29:51PM +0100, Heinrich Schuchardt wrote: > > > On 11/21/2017 09:23 PM, Ladislav Michl wrote: > > On Tue, Nov 21, 2017 at 07:45:03PM +0100, Heinrich Schuchardt wrote: > > > If 'file' cannot be allocated due to an out of memory > > > situation, do not dereference it. >

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Heinrich Schuchardt
On 11/21/2017 09:23 PM, Ladislav Michl wrote: On Tue, Nov 21, 2017 at 07:45:03PM +0100, Heinrich Schuchardt wrote: If 'file' cannot be allocated due to an out of memory situation, do not dereference it. When debugging this patch also avoids a misleading message "cannot find next direntry,

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Heinrich Schuchardt
On 11/21/2017 10:16 PM, Wolfgang Denk wrote: Dear Heinrich, In message <20171121184503.3193-1-xypron.g...@gmx.de> you wrote: If 'file' cannot be allocated due to an out of memory situation, do not dereference it. When debugging this patch also avoids a misleading message "cannot find next

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Ladislav Michl
On Tue, Nov 21, 2017 at 10:16:40PM +0100, Wolfgang Denk wrote: > Dear Heinrich, > > In message <20171121184503.3193-1-xypron.g...@gmx.de> you wrote: > > If 'file' cannot be allocated due to an out of memory > > situation, do not dereference it. > > > > When debugging this patch also avoids a

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Wolfgang Denk
Dear Heinrich, In message <20171121184503.3193-1-xypron.g...@gmx.de> you wrote: > If 'file' cannot be allocated due to an out of memory > situation, do not dereference it. > > When debugging this patch also avoids a misleading message > "cannot find next direntry, error %d" in case of an out of

Re: [U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Ladislav Michl
On Tue, Nov 21, 2017 at 07:45:03PM +0100, Heinrich Schuchardt wrote: > If 'file' cannot be allocated due to an out of memory > situation, do not dereference it. > > When debugging this patch also avoids a misleading message > "cannot find next direntry, error %d" in case of an out of > memory

[U-Boot] [PATCH 1/1] ubifs: avoid possible NULL dereference

2017-11-21 Thread Heinrich Schuchardt
If 'file' cannot be allocated due to an out of memory situation, do not dereference it. When debugging this patch also avoids a misleading message "cannot find next direntry, error %d" in case of an out of memory situation. It is sufficent to write "%s: Error, no memory for malloc!\n" in this