diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2019-07-09 15:17:12 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@ocrete.ca> | 2019-07-11 19:03:03 +0000 |
commit | bb7bea87094f5796408f41391cd5039f99faa053 (patch) | |
tree | c5ed7968f3ac1b6fceb150c5aacf73b2e9a2b7ae | |
parent | d8d2c0417a89efa238d49073d966461ba48bdaeb (diff) | |
download | libnice-bb7bea87094f5796408f41391cd5039f99faa053.tar.gz |
examples: fix compiler extra warnings
-rw-r--r-- | examples/simple-example.c | 2 | ||||
-rw-r--r-- | examples/threaded-example.c | 2 |
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]); |