mirror of https://github.com/OISF/suricata
app-layer/smtp: address format truncation warning
This appears to be a FP. Work around it to allow for using this warning
as an error.
Limit scheme lenght to < 256 as well.
app-layer-smtp.c: In function 'SMTPConfigure':
app-layer-smtp.c:371:69: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
371 | int r = snprintf(new_val, scheme_len + 1, "%s://", scheme->val);
| ^
app-layer-smtp.c:371:29: note: 'snprintf' output 4 or more bytes (assuming 5) into a destination of size 4
371 | int r = snprintf(new_val, scheme_len + 1, "%s://", scheme->val);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ticket: #7905.
pull/13926/head
parent
56b357d4a4
commit
981f902138
Loading…
Reference in New Issue