]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
genirq: Bump the size of the local variable for sprintf()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 15 May 2025 08:55:16 +0000 (11:55 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 15 May 2025 14:28:09 +0000 (16:28 +0200)
GCC is not happy about a sprintf() call on a buffer that might be too small
for the given formatting string.

kernel/irq/debugfs.c:233:26: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]

Fix this by bumping the size of the local variable for sprintf().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250515085516.2913290-1-andriy.shevchenko@linux.intel.com
Closes: https://lore.kernel.org/oe-kbuild-all/202505151057.xbyXAbEn-lkp@intel.com/
kernel/irq/debugfs.c

index 3d6a5b3cfaf3f78775aeb729d873d38a860600f4..3527defd2890e6295bd8d6ac2e5271fab8329692 100644 (file)
@@ -225,7 +225,7 @@ void irq_debugfs_copy_devname(int irq, struct device *dev)
 
 void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc)
 {
-       char name [10];
+       char name [12];
 
        if (!irq_dir || !desc || desc->debugfs_file)
                return;