diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-02-28 13:02:44 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-02-28 13:02:44 +0200 |
commit | 7c117fe8e80787ccfe511dd1a2d55a5c512b87a3 (patch) | |
tree | 8514359203cd41a70a89bf82795321d9467bbd9a /examples | |
parent | 1c6893c57dd995a1abcc8c5ae517929c57505c12 (diff) |
ges-ui: Ensure that string is \0-terminated
CID 1320699
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/ges-ui.c | 3 |
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) + |