Author: Lars Hjemli <hjemli@gmail.com>
Merge branch 'stable'
scan-tree.c | 1 + ui-repolist.c | 1 +
diff --git a/scan-tree.c b/scan-tree.c index cdafb02df6b51a9ea7bc82a94a59d18cf4389054..47f3988b3723673b0ed06b104f41822711db46cf 100644 --- a/scan-tree.c +++ b/scan-tree.c @@ -42,6 +42,7 @@ static char buf[MAX_PATH]; if (!(f = fopen(path, "r"))) return NULL; + buf[0] = 0; fgets(buf, MAX_PATH, f); fclose(f); return buf; diff --git a/ui-repolist.c b/ui-repolist.c index 25f076fd3198cac33bca32dcceea423e4d9af30c..6d2f93ffc05444b4ca34c17632c5f4f05e6a347d 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -23,6 +23,7 @@ static char buf[64], buf2[64]; if (!(f = fopen(path, "r"))) return -1; + buf[0] = 0; if (fgets(buf, sizeof(buf), f) == NULL) return -1; fclose(f);