ematch: fix possible snprintf overflow
Fixes gcc 8 warning about possible snprint overflow Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
b8a6088e13
commit
d5732e3470
|
|
@ -161,7 +161,7 @@ static struct ematch_util *get_ematch_kind(char *kind)
|
||||||
|
|
||||||
static struct ematch_util *get_ematch_kind_num(__u16 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)
|
if (lookup_map(kind, name, sizeof(name), EMATCH_MAP) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue