|
@@ -245,12 +245,22 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par,
|
|
}
|
|
}
|
|
|
|
|
|
if (info->helper[0]) {
|
|
if (info->helper[0]) {
|
|
|
|
+ if (strnlen(info->helper, sizeof(info->helper)) == sizeof(info->helper)) {
|
|
|
|
+ ret = -ENAMETOOLONG;
|
|
|
|
+ goto err3;
|
|
|
|
+ }
|
|
|
|
+
|
|
ret = xt_ct_set_helper(ct, info->helper, par);
|
|
ret = xt_ct_set_helper(ct, info->helper, par);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
goto err3;
|
|
goto err3;
|
|
}
|
|
}
|
|
|
|
|
|
if (info->timeout[0]) {
|
|
if (info->timeout[0]) {
|
|
|
|
+ if (strnlen(info->timeout, sizeof(info->timeout)) == sizeof(info->timeout)) {
|
|
|
|
+ ret = -ENAMETOOLONG;
|
|
|
|
+ goto err4;
|
|
|
|
+ }
|
|
|
|
+
|
|
ret = xt_ct_set_timeout(ct, par, info->timeout);
|
|
ret = xt_ct_set_timeout(ct, par, info->timeout);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
goto err4;
|
|
goto err4;
|