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: <202311182130.6duKTiLv-lkp@intel.com>
Date:   Sat, 18 Nov 2023 21:42:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kishon Vijay Abraham I <kishon@...com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Bjorn Helgaas <helgaas@...nel.org>
Subject: drivers/misc/pci_endpoint_test.c:38:41: warning: '%d' directive
 output may be truncated writing between 1 and 10 bytes into a region of size
 2

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   791c8ab095f71327899023223940dd52257a4173
commit: 2c156ac71c6b2518f3d589190f2a8872a8764faf misc: Add host side PCI driver for PCI test function device
date:   7 years ago
config: x86_64-buildonly-randconfig-001-20231012 (https://download.01.org/0day-ci/archive/20231118/202311182130.6duKTiLv-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/20231118/202311182130.6duKTiLv-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/202311182130.6duKTiLv-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/misc/pci_endpoint_test.c: In function 'pci_endpoint_test_probe':
>> drivers/misc/pci_endpoint_test.c:38:41: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
      38 | #define DRV_MODULE_NAME                 "pci-endpoint-test"
         |                                         ^~~~~~~~~~~~~~~~~~~
   drivers/misc/pci_endpoint_test.c:463:38: note: in expansion of macro 'DRV_MODULE_NAME'
     463 |         snprintf(name, sizeof(name), DRV_MODULE_NAME ".%d", id);
         |                                      ^~~~~~~~~~~~~~~
   drivers/misc/pci_endpoint_test.c:503:57: note: format string is defined here
     503 |         if (sscanf(misc_device->name, DRV_MODULE_NAME ".%d", &id) != 1)
         |                                                         ^~
   drivers/misc/pci_endpoint_test.c:38:41: note: directive argument in the range [0, 2147483647]
      38 | #define DRV_MODULE_NAME                 "pci-endpoint-test"
         |                                         ^~~~~~~~~~~~~~~~~~~
   drivers/misc/pci_endpoint_test.c:463:38: note: in expansion of macro 'DRV_MODULE_NAME'
     463 |         snprintf(name, sizeof(name), DRV_MODULE_NAME ".%d", id);
         |                                      ^~~~~~~~~~~~~~~
   drivers/misc/pci_endpoint_test.c:463:9: note: 'snprintf' output between 20 and 29 bytes into a destination of size 20
     463 |         snprintf(name, sizeof(name), DRV_MODULE_NAME ".%d", id);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +38 drivers/misc/pci_endpoint_test.c

    37	
  > 38	#define DRV_MODULE_NAME			"pci-endpoint-test"
    39	

-- 
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