aboutsummaryrefslogtreecommitdiff
path: root/calendar.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 18:56:08 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 18:56:08 +0100
commit4bfe894d2f35c7f03da453ca585a594061bc227c (patch)
tree75408427d7047ef4d1c6304623061ee2c969bbbb /calendar.c
parentSome scheme code. (diff)
downloadcalp-4bfe894d2f35c7f03da453ca585a594061bc227c.tar.gz
calp-4bfe894d2f35c7f03da453ca585a594061bc227c.tar.xz
Fix problem with uninitialized memmory.
Diffstat (limited to 'calendar.c')
-rw-r--r--calendar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/calendar.c b/calendar.c
index 6f1756a3..a60d8ea2 100644
--- a/calendar.c
+++ b/calendar.c
@@ -51,7 +51,7 @@ int handle_dir(vcomponent* cal, char* path) {
DIR* dir = opendir(path);
/* Buffer for holding search path and filename */
- char buf[PATH_MAX];
+ char buf[PATH_MAX] = { [0 ... PATH_MAX - 1] = '\0' };
strcpy(buf, path);
int path_len = strlen(path) + 1;