Permalink
Browse files

Merge pull request #13 from stephenvisser/master

Non-zero'd malloc wreaking havoc in OS X 10.8
  • Loading branch information...
2 parents 9b3e72f + 088324b commit 334002e741809eb7f6d0b7e5aea4cdd4e5359185 @tj 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 334002e

Please sign in to comment.