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>] [day] [month] [year] [list]
Message-ID: <202501120912.Z88mEJSU-lkp@intel.com>
Date: Sun, 12 Jan 2025 09:12:21 +0800
From: kernel test robot <lkp@...el.com>
To: Jose Abreu <Jose.Abreu@...opsys.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:841:52:
 warning: '%s' directive output may be truncated writing up to 431 bytes into
 a region of size 28

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b62cef9a5c673f1b8083159f5dc03c1c5daced2f
commit: 091810dbded96c2af81f645e386e4262553e3493 net: stmmac: Introduce selftests support
date:   6 years ago
config: x86_64-rhel-8.3-kunit (https://download.01.org/0day-ci/archive/20250112/202501120912.Z88mEJSU-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250112/202501120912.Z88mEJSU-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501120912.Z88mEJSU-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c: In function 'stmmac_selftest_get_strings':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:841:52: warning: '%s' directive output may be truncated writing up to 431 bytes into a region of size 28 [-Wformat-truncation=]
     841 |                 snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
         |                                                    ^~
   drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:841:17: note: 'snprintf' output between 5 and 436 bytes into a destination of size 32
     841 |                 snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     842 |                          stmmac_selftests[i].name);
         |                          ~~~~~~~~~~~~~~~~~~~~~~~~~


vim +841 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

   834	
   835	void stmmac_selftest_get_strings(struct stmmac_priv *priv, u8 *data)
   836	{
   837		u8 *p = data;
   838		int i;
   839	
   840		for (i = 0; i < stmmac_selftest_get_count(priv); i++) {
 > 841			snprintf(p, ETH_GSTRING_LEN, "%2d. %s", i + 1,
   842				 stmmac_selftests[i].name);
   843			p += ETH_GSTRING_LEN;
   844		}
   845	}
   846	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ