]> git.cameronkatri.com Git - cgit.git/commit
truncate buffer before reading empty files
authorSimon Arlott <simon@fire.lp0.eu>
Sat, 7 Mar 2009 00:06:24 +0000 (00:06 +0000)
committerLars Hjemli <hjemli@gmail.com>
Tue, 18 Aug 2009 12:27:41 +0000 (14:27 +0200)
commit011f2e9bdddcbfe65da397629bca87d167313a28
tree606b84a7b0211a6c4536bb508d57d4f19d20c3ab
parent6421dc38db02eff8d3ada93e87a2f7e5292af131
truncate buffer before reading empty files

If readfile() reads an empty file, fgets() won't truncate the buffer
and it'll still contain the contents of the previously read file.

[lh: fixed similar issue in ui-repolist.c]

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
scan-tree.c
ui-repolist.c