Commit 8da016a7 authored by Olivier Crête's avatar Olivier Crête

threaded-example: Make sure the foundation string is NULL terminated

parent ec2d0faa
......@@ -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])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment