Skip to content
Snippets Groups Projects
Commit d09eb198 authored by Olivier Crête's avatar Olivier Crête :ghost:
Browse files

example: Prevent possible non-NULL terminated string

parent 44395d81
No related merge requests found
......@@ -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])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment