]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
filebundle: another fb_read thinko fix
authorJaroslav Kysela <perex@perex.cz>
Tue, 8 Mar 2016 11:33:39 +0000 (12:33 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 8 Mar 2016 11:33:39 +0000 (12:33 +0100)
src/filebundle.c

index 274bd7f77ec89ad8b4c573f29ffea2dc367e5609..3d13a1f7cf7cb09b94ad7a80b1ad887779b17f8d 100644 (file)
@@ -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;