Skip to content

evenetcomm: fix possible buffer overflow

eventcomm.c: In function 'EventAutoDevProbe':
eventcomm.c:1045:32: warning: '%s' directive writing up to 255 bytes into a region of size 53 [-Wformat-overflow=]
 1045 |             sprintf(fname, "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
      |                                ^~
eventcomm.c:1045:13: note: 'sprintf' output between 12 and 267 bytes into a destination of size 64
 1045 |             sprintf(fname, "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult info@metux.net

Edited by Alan Coopersmith

Merge request reports