aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-30 18:46:39 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-02 11:44:58 +0200
commit8b88f5f7f320d579fe8c88203a5c98cade845f10 (patch)
treef66d4bde11305052bf54a77f1c0c68b8a4b0a334
parenta794811416685e34e60508128e968d79918c55cf (diff)
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
-rw-r--r--src/gprs/sgsn_cdr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs/sgsn_cdr.c b/src/gprs/sgsn_cdr.c
index 93ed0af0..a50b4dfd 100644
--- a/src/gprs/sgsn_cdr.c
+++ b/src/gprs/sgsn_cdr.c
@@ -153,9 +153,9 @@ static int cdr_snprintf_pdp(char *buf, size_t size, const char *ev,
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;