summaryrefslogtreecommitdiff
path: root/src/exa_wm_maskca_srcalpha_prog.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2023-03-18 15:45:44 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2024-05-07 00:32:24 +0300
commitce811e78882d9f31636351dfe65351f4ded52c74 (patch)
treecc68fce462c955b7d25ad8a1466b0edf50dbf2f7 /src/exa_wm_maskca_srcalpha_prog.h
parent48b093ba65146dc5bdfe6fffafde26e30b44f8da (diff)
intel: Fix some theoretical buffer overflowHEADmaster
Looks to me like the theoretical max the sprintf()s need here is about 34+4+9+sizeof(de->d_name) bytes. Let's just make that 64+sizeof(de->d_name) for simplicity. This shuts up the compiler: ../src/intel_device.c: In function ‘__intel_open_device__pci’: ../src/intel_device.c:387:60: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=] 387 | sprintf(path + base + 4, "/dev/dri/%s", de->d_name); | ^~ ../src/intel_device.c:387:25: note: ‘sprintf’ output between 10 and 265 bytes into a destination of size 256 387 | sprintf(path + base + 4, "/dev/dri/%s", de->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/intel_device.c:392:54: warning: ‘/dev’ directive writing 4 bytes into a region of size between 0 and 255 [-Wformat-overflow=] 392 | sprintf(path + base + 3, "/%s/dev", de->d_name); | ^~~~ ../src/intel_device.c:392:25: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256 392 | sprintf(path + base + 3, "/%s/dev", de->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'src/exa_wm_maskca_srcalpha_prog.h')
0 files changed, 0 insertions, 0 deletions