diff options
| author | Michal Simek <michal.simek@amd.com> | 2026-04-14 08:02:31 +0200 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-04-17 15:41:13 -0400 |
| commit | ad0150fa2fade906b1dfcbb1895037e5f39d9561 (patch) | |
| tree | 5b5541561898b4370bc063274cddf41eff860a98 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 850b107765c166522656bd468cf6afa89288d107 (diff) | |
drm/amdgpu/jpeg: Fix sprintf buffer overflow warning in jpeg_v2_5
Replace sprintf() with snprintf() to fix the -Werror=format-overflow
warning when building with allmodconfig:
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c:152:47: error: '%d' directive
writing between 1 and 11 bytes into a region of size 7
[-Werror=format-overflow=]
152 | sprintf(ring->name, "jpeg_dec_%d", i);
The ring->name buffer is 16 bytes. Using snprintf() with sizeof()
ensures the buffer cannot overflow regardless of the integer value.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
