Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 088324b0ddd4ac84a7d9a5e3e971b1ec197eb12c 1 parent 9b3e72f
Stephen Visser authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/watch.c
2  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);
Please sign in to comment.
Something went wrong with that request. Please try again.