summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/simple-example.c2
-rw-r--r--examples/threaded-example.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/simple-example.c b/examples/simple-example.c
index a26c422..b4da1e2 100644
--- a/examples/simple-example.c
+++ b/examples/simple-example.c
@@ -311,7 +311,7 @@ parse_candidate(char *scand, guint _stream_id)
cand->component_id = 1;
cand->stream_id = _stream_id;
cand->transport = NICE_CANDIDATE_TRANSPORT_UDP;
- strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION);
+ strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION - 1);
cand->foundation[NICE_CANDIDATE_MAX_FOUNDATION - 1] = 0;
cand->priority = atoi (tokens[1]);
diff --git a/examples/threaded-example.c b/examples/threaded-example.c
index a1eafae..6df6ac2 100644
--- a/examples/threaded-example.c
+++ b/examples/threaded-example.c
@@ -333,7 +333,7 @@ parse_candidate(char *scand, guint stream_id)
cand->component_id = 1;
cand->stream_id = stream_id;
cand->transport = NICE_CANDIDATE_TRANSPORT_UDP;
- strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION);
+ strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION - 1);
cand->foundation[NICE_CANDIDATE_MAX_FOUNDATION - 1] = 0;
cand->priority = atoi (tokens[1]);