From 8da016a76c9b05c56fe00d4cd1cd26813cf69951 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 28 Apr 2014 23:10:54 -0400 Subject: [PATCH] threaded-example: Make sure the foundation string is NULL terminated --- examples/threaded-example.c | 1 + 1 file changed, 1 insertion(+) 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])) { -- 2.7.4