From 1d7b156e7eea7dfeffd0176bf4dbd11755107e96 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Thu, 30 Apr 2020 18:21:12 -0300 Subject: [PATCH] lib: bump filter CLI XPath buffers size MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bump the size of the buffers so the new compilers don't complain about possible truncation: ``` lib/filter_cli.c: In function ‘ipv6_prefix_list_magic.isra.0’: lib/filter_cli.c:1336:5: error: ‘%lld’ directive output may be truncated writing between 1 and 20 bytes into a region of size between 16 and 527 [-Werror=format-truncation=] 1336 | "%s/entry[sequence='%" PRId64 "']", xpath, sseq); | ^~~~~~~~~~~~~~~~~~~~~~ lib/filter_cli.c:1336:25: note: format string is defined here 1336 | "%s/entry[sequence='%" PRId64 "']", xpath, sseq); lib/filter_cli.c:1336:5: note: directive argument in the range [-9223372036854775803, 9223372036854775807] 1336 | "%s/entry[sequence='%" PRId64 "']", xpath, sseq); | ^~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Rafael Zalamena --- lib/filter_cli.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/filter_cli.c b/lib/filter_cli.c index fd68bb59ec..860c155afe 100644 --- a/lib/filter_cli.c +++ b/lib/filter_cli.c @@ -186,8 +186,8 @@ DEFPY( int64_t sseq; char ipmask[64]; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 64]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the access-list first, so we can generate sequence if @@ -315,8 +315,8 @@ DEFPY( int64_t sseq; char ipmask[64]; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 64]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the access-list first, so we can generate sequence if @@ -588,8 +588,8 @@ DEFPY( int rv; int64_t sseq; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 64]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the access-list first, so we can generate sequence if @@ -767,8 +767,8 @@ DEFPY( int rv; int64_t sseq; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 64]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the access-list first, so we can generate sequence if @@ -949,8 +949,8 @@ DEFPY( int rv; int64_t sseq; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 64]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the access-list first, so we can generate sequence if @@ -1258,8 +1258,8 @@ DEFPY( int rv; int64_t sseq; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 128]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the prefix-list first, so we can generate sequence if @@ -1438,8 +1438,8 @@ DEFPY( int rv; int64_t sseq; char xpath[XPATH_MAXLEN]; - char xpath_entry[XPATH_MAXLEN + 32]; - char xpath_value[XPATH_MAXLEN + 128]; + char xpath_entry[XPATH_MAXLEN + 128]; + char xpath_value[XPATH_MAXLEN + 256]; /* * Create the prefix-list first, so we can generate sequence if -- 2.39.5