Re: [U-Boot] [PATCH] splash: Prevent splash_load_fs from writing to 0x0

Hi Jonathan,
On 02/27/17 10:10, Jonathan Golder wrote:
Hi Igor,
I haven't looked at fs_read() yet, but from the above it seems that a better approach would be to fix the fs_read()? Might there be use cases when it is legitimate to pass NULL?
Well, actually I have not dived into the depths of the fs_read () deeper than realising that something went wrong.
Before posting this patch I greped for usages of fs_read() with NULL as last parameter and found only this occurrence. So I supposed that passing NULL for actread is not an intended use case of fs_read ().
Probably, yet this use case appeared and correct me if I'm wrong, the splash source code does not really care of that parameter, and it wants to use the fs_read(). So maybe the problem is in fs_read() API not covering a legitimate use case? Of course this patch will fix the problem by hiding it till next time.
participants (1)
-
Igor Grinberg