mirror of https://github.com/OISF/suricata
eve/alert: work around format truncation warning
This appears to be a FP. Work around it to allow for using this warning
as an error.
output-json-alert.c: In function 'AlertJsonReference':
output-json-alert.c:188:44: warning: '%s' directive output may be truncated writing likely 1 or more bytes into a region of size between 0 and 1 [-Wformat-truncation=]
188 | snprintf(kv_store, size_needed, "%s%s", kv->key, kv->reference);
| ^~
output-json-alert.c:188:41: note: assuming directive output of 1 byte
188 | snprintf(kv_store, size_needed, "%s%s", kv->key, kv->reference);
| ^~~~~~
output-json-alert.c:188:9: note: 'snprintf' output 1 or more bytes (assuming 3) into a destination of size 1
188 | snprintf(kv_store, size_needed, "%s%s", kv->key, kv->reference);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ticket: #7905.
pull/13926/head
parent
40363f7465
commit
a57643c70b
Loading…
Reference in New Issue