[Pkg-telepathy-commits] [libnice] 251/265: example: Prevent possible non-NULL terminated string
Simon McVittie
smcv at debian.org
Wed May 14 12:05:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository libnice.
commit d09eb198a818f4c8f2285511cf31723534ee161a
Author: Olivier Crête <olivier.crete at collabora.com>
Date: Thu Apr 24 21:32:12 2014 -0400
example: Prevent possible non-NULL terminated string
---
examples/simple-example.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/simple-example.c b/examples/simple-example.c
index 397a333..76a39c8 100644
--- a/examples/simple-example.c
+++ b/examples/simple-example.c
@@ -308,6 +308,7 @@ parse_candidate(char *scand, guint _stream_id)
cand->stream_id = _stream_id;
cand->transport = NICE_CANDIDATE_TRANSPORT_UDP;
strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION);
+ cand->foundation[NICE_CANDIDATE_MAX_FOUNDATION - 1] = 0;
cand->priority = atoi (tokens[1]);
if (!nice_address_set_from_string(&cand->addr, tokens[2])) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git
More information about the Pkg-telepathy-commits
mailing list