From: Jaroslav Kysela Date: Tue, 8 Mar 2016 11:33:39 +0000 (+0100) Subject: filebundle: another fb_read thinko fix X-Git-Tag: v4.2.1~942 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=121069652d8c7f4174734b9ee6ea35925938b0e3;p=thirdparty%2Ftvheadend.git filebundle: another fb_read thinko fix --- diff --git a/src/filebundle.c b/src/filebundle.c index 274bd7f77..3d13a1f7c 100644 --- a/src/filebundle.c +++ b/src/filebundle.c @@ -450,7 +450,7 @@ ssize_t fb_read ( fb_file *fp, void *buf, size_t count ) char *fb_gets ( fb_file *fp, void *buf, size_t count ) { ssize_t c = 0, err; - while ((err = fb_read(fp, buf+c, 1)) && c < (count-1)) { + while ((err = fb_read(fp, buf+c, 1)) > 0 && c < (count-1)) { char b = ((char*)buf)[c]; c++; if (b == '\n' || b == '\0') break;