mirror of https://github.com/OISF/suricata
detect/address: address format-trunction warnings
This appears to be a FP. Work around it to allow for using this warning
as an error.
detect-engine-address.c: In function ‘DetectAddressParseInternal’:
detect-engine-address.c:851:35: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
851 | "[%s]", rule_var_address);
| ^
detect-engine-address.c:850:21: note: ‘snprintf’ output 3 or more bytes (assuming 4) into a destination of size 3
850 | snprintf(temp_rule_var_address, str_size,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
851 | "[%s]", rule_var_address);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
detect-engine-address.c:919:34: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
919 | "[%s]", rule_var_address);
| ^
detect-engine-address.c:918:21: note: ‘snprintf’ output 3 or more bytes (assuming 4) into a destination of size 3
918 | snprintf(temp_rule_var_address, strlen(rule_var_address) + 3,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
919 | "[%s]", rule_var_address);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
Ticket: #7905.
pull/13926/head
parent
f48099edd3
commit
bccbab6e33
Loading…
Reference in New Issue