From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f65.google.com ([209.85.160.65]:35325 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbeCTU3W (ORCPT ); Tue, 20 Mar 2018 16:29:22 -0400 Received: by mail-pl0-f65.google.com with SMTP id p9-v6so1729724pls.2 for ; Tue, 20 Mar 2018 13:29:22 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 v2 7/9] ematch: fix possible snprintf overflow Date: Tue, 20 Mar 2018 13:29:07 -0700 Message-Id: <20180320202909.22166-8-stephen@networkplumber.org> In-Reply-To: <20180320202909.22166-1-stephen@networkplumber.org> References: <20180320202909.22166-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org List-ID: Fixes gcc 8 warning about possible snprint overflow Signed-off-by: Stephen Hemminger --- tc/m_ematch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ematch.c b/tc/m_ematch.c index d2bb5c380382..0d66dc682314 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; -- 2.16.2