gcc7: fix format truncation warning

detect-rpc.c: In function ‘DetectRpcParse’:
detect-rpc.c:225:50: error: ‘%s’ directive argument is null [-Werror=format-truncation=]
                 SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
                                                  ^
util-debug.h:239:77: note: in definition of macro ‘SCLogErr’
             int _sc_log_ret = snprintf(_sc_log_msg, SC_LOG_MAX_LOG_MSG_LEN, __VA_ARGS__);   \
                                                                             ^~~~~~~~~~~
detect-rpc.c:225:17: note: in expansion of macro ‘SCLogError’
                 SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
                 ^~~~~~~~~~
pull/2836/head
Victor Julien 8 years ago
parent 82e1af58cc
commit a73e84ea50

@ -220,7 +220,7 @@ DetectRpcData *DetectRpcParse (char *rpcstr)
break;
}
} else {
SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",args[i]);
SCLogError(SC_ERR_INVALID_VALUE, "invalid rpc option %s",rpcstr);
goto error;
}
}

Loading…
Cancel
Save