summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c476d3)
raw | patch | inline | side by side (parent: 0c476d3)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 2 Jan 2015 11:56:14 +0000 (12:56 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 2 Jan 2015 11:56:14 +0000 (12:56 +0100) |
Thanks to clang for identifying this :-)
src/frontend/scanner.l | patch | blob | history |
diff --git a/src/frontend/scanner.l b/src/frontend/scanner.l
index 65ec9edceb79ff73769e03e37046123971d9b73f..6781122c3c2b830547b66a0fe82a7e57b3f15cb4 100644 (file)
--- a/src/frontend/scanner.l
+++ b/src/frontend/scanner.l
assert(tmp);
tmp = strchr(tmp + 1, ':');
if (! tmp)
- strncat(time, ":00", sizeof(time));
+ strncat(time, ":00", sizeof(time) - strlen(time) - 1);
if (! strptime(time, "%H:%M:%S", &tm)) {
char errmsg[1024];