projects
/
platform
/
upstream
/
libnice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec2d0fa
)
threaded-example: Make sure the foundation string is NULL terminated
author
Olivier Crête
<olivier.crete@collabora.com>
Tue, 29 Apr 2014 03:10:54 +0000
(23:10 -0400)
committer
Olivier Crête
<olivier.crete@collabora.com>
Tue, 29 Apr 2014 03:10:54 +0000
(23:10 -0400)
examples/threaded-example.c
patch
|
blob
|
history
diff --git
a/examples/threaded-example.c
b/examples/threaded-example.c
index
29d533a
..
621bf18
100644
(file)
--- 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])) {