From: Stephen Hemminger Date: Mon, 19 Mar 2018 23:22:39 +0000 (-0700) Subject: ematch: fix possible snprintf overflow X-Git-Tag: v4.16.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5732e34707b0e62c2fcbaf78ca3bd26b229a993;p=thirdparty%2Fiproute2.git ematch: fix possible snprintf overflow Fixes gcc 8 warning about possible snprint overflow Signed-off-by: Stephen Hemminger --- diff --git a/tc/m_ematch.c b/tc/m_ematch.c index d2bb5c380..0d66dc682 100644 --- a/tc/m_ematch.c +++ b/tc/m_ematch.c @@ -161,7 +161,7 @@ static struct ematch_util *get_ematch_kind(char *kind) static struct ematch_util *get_ematch_kind_num(__u16 kind) { - char name[32]; + char name[513]; if (lookup_map(kind, name, sizeof(name), EMATCH_MAP) < 0) return NULL;