svn commit: r245246 - projects/diffused_head/sbin/ipfw
Lawrence Stewart
lstewart at FreeBSD.org
Thu Jan 10 04:51:08 UTC 2013
Author: lstewart
Date: Thu Jan 10 04:51:07 2013
New Revision: 245246
URL: http://svnweb.freebsd.org/changeset/base/245246
Log:
Fix a few bugs discovered by clang related to string handling of action
parameters.
Modified:
projects/diffused_head/sbin/ipfw/diffuse_ui.c
Modified: projects/diffused_head/sbin/ipfw/diffuse_ui.c
==============================================================================
--- projects/diffused_head/sbin/ipfw/diffuse_ui.c Thu Jan 10 04:41:04 2013 (r245245)
+++ projects/diffused_head/sbin/ipfw/diffuse_ui.c Thu Jan 10 04:51:07 2013 (r245246)
@@ -1378,14 +1378,14 @@ export_config(int ac, char **av)
case TOK_DI_EXP_ACTION_PARAMS:
NEED(exp, "action-param is only for export config");
NEED1("action-param must be specified");
- if (strlen(*av) > DI_MAX_NAME_STR_LEN - 1) {
+ if (strlen(*av) > DI_MAX_PARAM_STR_LEN - 1) {
errx(EX_DATAERR, "action-param cannot be "
"longer than %d chars",
- DI_MAX_NAME_STR_LEN - 1);
+ DI_MAX_PARAM_STR_LEN - 1);
}
strncpy(exp->conf.action_param, *av,
DI_MAX_PARAM_STR_LEN - 1);
- exp->conf.action[DI_MAX_PARAM_STR_LEN - 1] = '\0';
+ exp->conf.action_param[DI_MAX_PARAM_STR_LEN - 1] = '\0';
ac--; av++;
break;
More information about the svn-src-projects
mailing list