Subject: Re: [PATCH net] net/mlx5e: Fix snprintf return check

From: Rahul Rameshbabu <[email-masked]>
Date: Mon, 27 Nov 2023 10:46:17 -0800

On Mon, 27 Nov, 2023 16:00:53 +0300 Dan Carpenter <[email-masked]> wrote:
> This code prints a string and then if there wasn't enough space for the
> whole string, then it prints a slightly shorter string.  However, the
> test for overflow should have been >= instead of == because snprintf()
> returns the number of bytes which *would* have been printed if there
> were enough space.
>
> Fixes: 41e63c2baa11 ("net/mlx5e: Check return value of snprintf writing to fw_version buffer")
> Fixes: 1b2bd0c0264f ("net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors")
> Signed-off-by: Dan Carpenter <[email-masked]>
> ---

I have already sent out patches targeting net for this on the mailing
list. That said, thanks for the follow-up.

  * https://lore.kernel.org/netdev/[email-masked]/
  * https://lore.kernel.org/netdev/[email-masked]/

These have been reviewed by Simon Horman.

--
Thanks,

Rahul Rameshbabu