projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c6893c
)
ges-ui: Ensure that string is \0-terminated
author
Sebastian Dröge
<sebastian@centricular.com>
Tue, 28 Feb 2017 11:02:44 +0000
(13:02 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Tue, 28 Feb 2017 11:02:44 +0000
(13:02 +0200)
CID 1320699
examples/c/ges-ui.c
patch
|
blob
|
history
diff --git
a/examples/c/ges-ui.c
b/examples/c/ges-ui.c
index
85005d7
..
4acd1ee
100644
(file)
--- 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) +