diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-25 11:00:23 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-25 11:00:23 +0200 |
commit | 0cccf408602f509943c6556676327f3cb18b5f59 (patch) | |
tree | bb9f0fb831843eaaf02134b8e650a2a32172d8ff /src | |
parent | 7fcb3ce2dfb60d8114f7a0533a78c2b5d94be87b (diff) |
gprs: Make sure that the buf is NULL terminated at the end
Fixes: Coverity CID 1107253
Diffstat (limited to 'src')
-rw-r--r-- | src/gb/gprs_ns.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index 1754501a..b667998c 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; } |