Permalink
Browse files

Resolved issue due to non-zero'd memory and strcat

  • Loading branch information...
1 parent 9b3e72f commit 088324b0ddd4ac84a7d9a5e3e971b1ec197eb12c Stephen Visser committed Aug 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/watch.c
View
@@ -131,7 +131,7 @@ length(char **strs) {
char *
join(char **strs, int len, char *val) {
--len;
- char *buf = malloc(length(strs) + len * strlen(val));
+ char *buf = calloc(1, length(strs) + len * strlen(val));
char *str;
while ((str = *strs++)) {
strcat(buf, str);

0 comments on commit 088324b

Please sign in to comment.