aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-25 11:00:23 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-25 11:00:23 +0200
commit0cccf408602f509943c6556676327f3cb18b5f59 (patch)
treebb9f0fb831843eaaf02134b8e650a2a32172d8ff /src/gb/gprs_ns.c
parent7fcb3ce2dfb60d8114f7a0533a78c2b5d94be87b (diff)
gprs: Make sure that the buf is NULL terminated at the end
Fixes: Coverity CID 1107253
Diffstat (limited to 'src/gb/gprs_ns.c')
-rw-r--r--src/gb/gprs_ns.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 1754501..b667998 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -1053,6 +1053,7 @@ const char *gprs_ns_ll_str(struct gprs_nsvc *nsvc)
snprintf(buf, sizeof(buf), "%s:%u",
inet_ntoa(nsvc->ip.bts_addr.sin_addr),
ntohs(nsvc->ip.bts_addr.sin_port));
+ buf[sizeof(buf) - 1] = '\0';
return buf;
}