commit | 0cccf408602f509943c6556676327f3cb18b5f59 | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Fri Oct 25 11:00:23 2013 +0200 |
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Fri Oct 25 11:00:23 2013 +0200 |
tree | bb9f0fb831843eaaf02134b8e650a2a32172d8ff | |
parent | 7fcb3ce2dfb60d8114f7a0533a78c2b5d94be87b [diff] [blame] |
gprs: Make sure that the buf is NULL terminated at the end Fixes: Coverity CID 1107253
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 @@ 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; }