Re: [PATCH] accel/habanalabs/gaudi2: Fix incorrect string length computation in gaudi2_psoc_razwi_get_engines()

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

 



On Tue, Sep 5, 2023 at 3:28 PM Stanislaw Gruszka
<stanislaw.gruszka@xxxxxxxxxxxxxxx> wrote:
>
> On Mon, Sep 04, 2023 at 09:18:36PM +0200, Christophe JAILLET wrote:
> > snprintf() returns the "number of characters which *would* be generated for
> > the given input", not the size *really* generated.
> >
> > In order to avoid too large values for 'str_size' (and potential negative
> > values for "PSOC_RAZWI_ENG_STR_SIZE - str_size") use scnprintf()
> > instead of snprintf().
> >
> > Fixes: c0e6df916050 ("accel/habanalabs: fix address decode RAZWI handling")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@xxxxxxxxxxxxxxx>
Applied to -next.
Thanks for the patch.
Oded




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux