Re: [PATCH v4] mmc-utils: Use printf() to extract and print fw version

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

 



On Tue, 30 Nov 2021 at 13:07, Oleh Kravchenko <oleg@xxxxxxxxxx> wrote:
>
> Hello Avri!
>
> 30.11.21 09:42, Avri Altman пише:
> > Hi,
> >> This patch also fixes a compile error with a newer version of GCC:
> >> error: '__builtin_strncpy' output may be truncated copying 8 bytes from a
> >> string of length 511 [-Werror=stringop-truncation]
> > You are reverting commit 0eea71e4f2 (mmc-utils: Fix for Firmware Version string printing).
> > Please use git revert and add an explanation in your commit log.
>
> I'm not reverting this commit.
> It's similar but not.

Right, this time we limit the print to 8 chars, which avoids garbage
from a non-NULL terminated string.

Perhaps we should add (similar to what we do for kernel commits):
Fixes: 0eea71e4f22a ("mmc-utils: Fix for Firmware Version string printing")

[...]

Kind regards
Uffe




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux