lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 19 Jan 2024 18:20:36 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>, 
 Prabhakar <prabhakar.csengg@...il.com>
Cc: Biju Das <biju.das.jz@...renesas.com>, dmaengine@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org, 
 Claudiu Beznea <claudiu.beznea.uj@...renesas.com>, 
 Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH] dmaengine: sh: rz-dmac: Avoid format-overflow warning


On Wed, 10 Jan 2024 22:27:17 +0000, Prabhakar wrote:
> The max channel count for RZ DMAC is 16, hence use u8 instead of unsigned
> int and make the pdev_irqname string long enough to avoid the warning.
> 
> This fixes the below issue:
> drivers/dma/sh/rz-dmac.c: In function ‘rz_dmac_probe’:
> drivers/dma/sh/rz-dmac.c:770:34: warning: ‘%u’ directive writing between 1 and 10 bytes into a region of size 3 [-Wformat-overflow=]
>   770 |         sprintf(pdev_irqname, "ch%u", index);
>       |                                  ^~
> In function ‘rz_dmac_chan_probe’,
>     inlined from ‘rz_dmac_probe’ at drivers/dma/sh/rz-dmac.c:910:9:
> drivers/dma/sh/rz-dmac.c:770:31: note: directive argument in the range [0, 4294967294]
>   770 |         sprintf(pdev_irqname, "ch%u", index);
>       |                               ^~~~~~
> drivers/dma/sh/rz-dmac.c:770:9: note: ‘sprintf’ output between 4 and 13 bytes into a destination of size 5
>   770 |         sprintf(pdev_irqname, "ch%u", index);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Applied, thanks!

[1/1] dmaengine: sh: rz-dmac: Avoid format-overflow warning
      commit: c4d6dcb3b6250ea546a952ad33382daf7cd32425

Best regards,
-- 
~Vinod



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ