Change in ...osmo-sgsn[master]: sgsn_cdrc: Fix ip addr string buffer size

pespin gerrit-no-reply at lists.osmocom.org
Fri Aug 30 16:47:20 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15358


Change subject: sgsn_cdrc: Fix ip addr string buffer size
......................................................................

sgsn_cdrc: Fix ip addr string buffer size

INET(6)_ADDRSTRLEN already contains the required extra null byte at the
end, no need to add +1 to it.

Change-Id: I5a16659e007c6883fe21582cce5dac544e6d4bb9
---
M src/gprs/sgsn_cdr.c
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/58/15358/1

diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c
index 93ed0af..a50b4df 100644
--- a/src/gprs/sgsn_cdr.c
+++ b/src/gprs/sgsn_cdr.c
@@ -153,9 +153,9 @@
 			struct sgsn_pdp_ctx *pdp)
 {
 	char apni[(pdp->lib ? pdp->lib->apn_use.l : 0) + 1];
-	char ggsn_addr[INET_ADDRSTRLEN + 1];
-	char sgsn_addr[INET_ADDRSTRLEN + 1];
-	char eua_addr[INET6_ADDRSTRLEN + 1];
+	char ggsn_addr[INET_ADDRSTRLEN];
+	char sgsn_addr[INET_ADDRSTRLEN];
+	char eua_addr[INET6_ADDRSTRLEN];
 	struct tm tm;
 	struct timeval tv;
 	time_t duration;

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I5a16659e007c6883fe21582cce5dac544e6d4bb9
Gerrit-Change-Number: 15358
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190830/51bc3c10/attachment.html>


More information about the gerrit-log mailing list