diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-04-28 23:10:54 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-04-28 23:10:54 -0400 |
commit | 8da016a76c9b05c56fe00d4cd1cd26813cf69951 (patch) | |
tree | fb849c4b194695dfd68d3ce59d33f5c7e679912e | |
parent | ec2d0faa636667c678ac8896fba122acbac7de3b (diff) |
threaded-example: Make sure the foundation string is NULL terminated
-rw-r--r-- | examples/threaded-example.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/threaded-example.c b/examples/threaded-example.c index 29d533a..621bf18 100644 --- a/examples/threaded-example.c +++ b/examples/threaded-example.c @@ -331,6 +331,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])) { |