]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ematch: fix possible snprintf overflow
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 19 Mar 2018 23:22:39 +0000 (16:22 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 29 Mar 2018 15:32:43 +0000 (08:32 -0700)
Fixes gcc 8 warning about possible snprint overflow

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/m_ematch.c

index d2bb5c38038202e439ab48d6776f1e9fadaace21..0d66dc682314ae8a89751820cdf296f0ebd20cff 100644 (file)
@@ -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;