From: Olivier CrĂȘte Date: Tue, 29 Apr 2014 03:10:54 +0000 (-0400) Subject: threaded-example: Make sure the foundation string is NULL terminated X-Git-Tag: 0.1.7~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8da016a76c9b05c56fe00d4cd1cd26813cf69951;p=platform%2Fupstream%2Flibnice.git threaded-example: Make sure the foundation string is NULL terminated --- 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])) {