Re: [PATCH] mtd: parsers: tplink_safeloader: fix uninitialized variable bug

Miquel Raynal
2022-11-07T16:11:32Z

rafal@milecki.pl wrote on Mon, 7 Nov 2022 17:01:04 +0100:

> On 7.11.2022 16:52, Miquel Raynal wrote:
> > Hi Dan,
> >
> > dan.carpenter@oracle.com wrote on Tue, 25 Oct 2022 18:34:24 +0300:
> >
> >> On 64 bit systems, the highest 32 bits of the "offset" variable are
> >> not initialized. Also the existing code is not endian safe (it will
> >> fail on big endian systems). Change the type of "offset" to a u32.
> >>
> >> Fixes: aec4d5f5ffd0 ("mtd: parsers: add TP-Link SafeLoader partitions table parser")
> >> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >> ---
> >> drivers/mtd/parsers/tplink_safeloader.c | 6 +++---
> >> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/mtd/parsers/tplink_safeloader.c b/drivers/mtd/parsers/tplink_safeloader.c
> >> index 23584a477391..f601e7bd8627 100644
> >> --- a/drivers/mtd/parsers/tplink_safeloader.c
> >> +++ b/drivers/mtd/parsers/tplink_safeloader.c
> >
> > I am sorry but I don't have this file in my tree, what kernel are you
> > using?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/log/?h=mtd/next
> https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/commit/?h=mtd/next&id=aec4d5f5ffd0f0092bd9dc21ea90e0bc237d4b74
>
> (committer Miquel Raynal ;) )

Ah, I knew I was missing something: the right branch. :-)

Thanks,
Miquèl