From: Roi Dayan Date: Wed, 7 Dec 2022 08:22:13 +0000 (+0200) Subject: tc: ct: Fix invalid pointer dereference X-Git-Tag: v6.1.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de59102f49ff9128378568cf967d6c7aabea6f2;p=thirdparty%2Fiproute2.git tc: ct: Fix invalid pointer dereference Using macro NEXT_ARG_FWD does not validate argc. Use macro NEXT_ARG which validates argc while parsing args in the same loop iteration. Fixes: c8a494314c40 ("tc: Introduce tc ct action") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Stephen Hemminger --- diff --git a/tc/m_ct.c b/tc/m_ct.c index a02bf0cc1..54d64867a 100644 --- a/tc/m_ct.c +++ b/tc/m_ct.c @@ -243,7 +243,7 @@ parse_ct(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, return -1; } - NEXT_ARG_FWD(); + NEXT_ARG(); if (matches(*argv, "port") != 0) continue;