summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-02-28 13:02:44 +0200
committerSebastian Dröge <sebastian@centricular.com>2017-02-28 13:02:44 +0200
commit7c117fe8e80787ccfe511dd1a2d55a5c512b87a3 (patch)
tree8514359203cd41a70a89bf82795321d9467bbd9a /examples
parent1c6893c57dd995a1abcc8c5ae517929c57505c12 (diff)
ges-ui: Ensure that string is \0-terminated
CID 1320699
Diffstat (limited to 'examples')
-rw-r--r--examples/c/ges-ui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/c/ges-ui.c b/examples/c/ges-ui.c
index 85005d7b..4acd1ee9 100644
--- a/examples/c/ges-ui.c
+++ b/examples/c/ges-ui.c
@@ -523,7 +523,8 @@ str_to_time (const gchar * str)
m = strtoull (buf, NULL, 10);
- strncpy (buf, &str[6], sizeof (buf));
+ strncpy (buf, &str[6], sizeof (buf) - 1);
+ buf[sizeof (buf) - 1] = '\0';
s = strtod (buf, NULL);
ret = (h * 3600 * GST_SECOND) +