Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 45e9bcce authored by Fiqri Ardyansyah's avatar Fiqri Ardyansyah Committed by Pranav Vashi
Browse files

drivers: camera: Fix potential buffer overflows



This fixes the -Wfortify-source warning detected on Clang 18.0.0.

../drivers/media/platform/msm/camera/cam_utils/cam_io_util.c:270:4: warning: 'snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 [-Wfortify-source]
  270 |                         snprintf(p_str, 12, "0x%08x: ",
      |                         ^
../drivers/media/platform/msm/camera/cam_utils/cam_io_util.c:275:3: warning: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 11 [-Wfortify-source]
  275 |                 snprintf(p_str, 10, "%08x  ", data);
      |                 ^
../drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_soc.c:46:4: warning: 'snprintf' will always be truncated; specified size is 12, but format string expands to at least 13 [-Wfortify-source]
   46 |                         snprintf(p_str, 12, "0x%08x: ",
      |                         ^
../drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/cam_csiphy_soc.c:51:3: warning: 'snprintf' will always be truncated; specified size is 9, but format string expands to at least 10 [-Wfortify-source]
   51 |                 snprintf(p_str, 9, "%08x ", data);
      |                 ^

Signed-off-by: default avatarFiqri Ardyansyah <fiqri0927936@gmail.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent 460d1033
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment