Date: Thu, 10 Jan 2013 04:51:07 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245246 - projects/diffused_head/sbin/ipfw Message-ID: <201301100451.r0A4p7DG057399@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301100451.r0A4p7DG057399>