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

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/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Sep 2 10:07:32 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15358 )

Change subject: sgsn_cdr.c: Fix ip addr string buffer size
......................................................................

sgsn_cdr.c: 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(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



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: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190902/5dacac85/attachment.htm>


More information about the gerrit-log mailing list