Change in osmo-bts[master]: rsl.c: Fix compiler error on gcc-9.2.1

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Jan 12 15:15:18 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16826 )


Change subject: rsl.c: Fix compiler error on gcc-9.2.1
......................................................................

rsl.c: Fix compiler error on gcc-9.2.1

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
---
M src/common/rsl.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/26/16826/1

diff --git a/src/common/rsl.c b/src/common/rsl.c
index d7e3565..10fb95e 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2081,7 +2081,7 @@
 	}
 
 	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, "

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16826
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id982a814f401e304327d25c77666f039bc156c1f
Gerrit-Change-Number: 16826
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200112/58dc0f3f/attachment.htm>


More information about the gerrit-log mailing list