Re: [PATCH V2] efi: efibc: Guard against allocation failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 11 Sept 2022 at 16:36, Guilherme G. Piccoli <gpiccoli@xxxxxxxxxx> wrote:
>
> On 10/09/2022 01:56, Christophe JAILLET wrote:
> > [...]
> >>      wdata = kmalloc(MAX_DATA_LEN * sizeof(efi_char16_t), GFP_KERNEL);
> > Hi,
> >
> > even if mostly useless in this case, kmalloc_array()?
> >
> > Or certainly maybe even better, kstrndup()?
> >
> > CJ
> >
>
> Thanks! It's up to Ard, I could rework with this change if makes sense.
> Cheers,
>

kstrndup() does not work on wide strings so I think the code is fine as is.

I've queued it as a fix - thanks.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux