Replace all sprintf with snprintf

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-03-05 22:34:33 +08:00
committed by Alin Jerpelea
parent fa8719bb5a
commit 6f6fce95a2
36 changed files with 120 additions and 84 deletions
+1 -1
View File
@@ -2408,7 +2408,7 @@ int usbdev_serialinitialize(int minor)
/* Register the single port supported by this implementation */
sprintf(devname, "/dev/ttyUSB%d", minor);
snprintf(devname, sizeof(devname), "/dev/ttyUSB%d", minor);
ret = uart_register(devname, &priv->serdev);
if (ret)
{