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: <dcf60154f976e9457a937e20626d0a6a@208suo.com>
Date:   Thu, 13 Jul 2023 17:58:48 +0800
From:   hanyu001@...suo.com
To:     stuyoder@...il.com, laurentiu.tudor@....com
Cc:     linux-kernel@...r.kernel.org
Subject: Fwd: [PATCH] bus: fsl-mc: replace snprintf in show functions with
 sysfs_emit

show() should not use snprintf() when formatting the value to be
returned to user space.

Fix the following coccicheck warning:
drivers/media/i2c/ccs/ccs-core.c:3761: WARNING: use scnprintf or 
sprintf.

./drivers/bus/fsl-mc/fsl-mc-bus.c:204:8-16: WARNING: use scnprintf or 
sprintf

Signed-off-by: ztt <1549089851@...com>
---
  drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c 
b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 4352745a923c..c28bde570cb1 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -201,7 +201,7 @@ static ssize_t driver_override_show(struct device 
*dev,
  {
      struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);

-    return snprintf(buf, PAGE_SIZE, "%s\n", mc_dev->driver_override);
+    return scnprintf(buf, PAGE_SIZE, "%s\n", mc_dev->driver_override);
  }
  static DEVICE_ATTR_RW(driver_override);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ