mirror of https://github.com/OISF/suricata
detect/datasets: address format truncation warnings
detect-dataset.c: In function ‘SetupLoadPath’:
detect-dataset.c:391:9: error: ‘%s’ directive output may be truncated writing likely 1 or more bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
391 | if (snprintf(path, sizeof(path), "%s/%s", dir, load) >= (int)sizeof(path)) // TODO windows path
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
detect-dataset.c:391:9: note: assuming directive output of 1 byte
detect-dataset.c:391:9: note: ‘snprintf’ output 2 or more bytes (assuming 4098) into a destination of size 4096
Ticket: #7905.
pull/13926/head
parent
14987dca35
commit
f48099edd3
Loading…
Reference in New Issue