From 113712c728f4abc07b07a1ab62c027b8e7690349 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 12 Jan 2020 16:11:12 +0100 Subject: rsl.c: Fix compiler error on gcc-9.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rsl.c: In function ‘rsl_rx_ipac_XXcx’: rsl.c:2147:39: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 28 [-Werror=format-truncation=] 2147 | snprintf(cname, sizeof(cname), "bts@%s", ipstr); | ^~ rsl.c:2147:3: note: ‘snprintf’ output between 5 and 260 bytes into a destination of size 32 2147 | snprintf(cname, sizeof(cname), "bts@%s", ipstr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Id982a814f401e304327d25c77666f039bc156c1f --- src/common/rsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/rsl.c') diff --git a/src/common/rsl.c b/src/common/rsl.c index d7e35654..10fb95e9 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2081,7 +2081,7 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg) } if (dch->c.msg_type == RSL_MT_IPAC_CRCX) { - char cname[32]; + char cname[256+4]; char *ipstr = NULL; if (lchan->abis_ip.rtp_socket) { LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC CRCX, " -- cgit v1.2.3