[Intel-wired-lan] [PATCH 2/7] i40e: Use scnprintf() for avoiding potential buffer overflow
Bowers, AndrewX
andrewx.bowers at intel.com
Mon Mar 16 20:32:12 UTC 2020
-----Original Message-----
From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Takashi Iwai
Sent: Wednesday, March 11, 2020 1:38 AM
To: netdev at vger.kernel.org
Cc: intel-wired-lan at lists.osuosl.org; David S . Miller <davem at davemloft.net>
Subject: [Intel-wired-lan] [PATCH 2/7] i40e: Use scnprintf() for avoiding potential buffer overflow
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf().
Cc: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
Cc: intel-wired-lan at lists.osuosl.org
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list