From: Rob Landley Date: Fri, 18 Jul 2008 09:15:59 +0000 (-0500) Subject: Bug spotted by Roberto Foglietta: at EOF readall() should return count, not len. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=15b231591d3e95d502b2cee1d7d6192177230c15;p=android-x86%2Fexternal-toybox.git Bug spotted by Roberto Foglietta: at EOF readall() should return count, not len. --- diff --git a/lib/lib.c b/lib/lib.c index 8467f866..959cd46c 100644 --- a/lib/lib.c +++ b/lib/lib.c @@ -219,9 +219,10 @@ FILE *xfopen(char *path, char *mode) ssize_t readall(int fd, void *buf, size_t len) { size_t count = 0; + while (count