]> gitweb.ps.run Git - ps-cgit/commitdiff
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)
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>

No differences found