From 41b04677194780c96cc6dcc36a5d4ee035c80d9a Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 12 Sep 2016 19:51:31 -0400 Subject: Prevent offset from xx when reading zero --- .bin/xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/xx.c b/.bin/xx.c index 733a1bda..7ffadd7f 100755 --- a/.bin/xx.c +++ b/.bin/xx.c @@ -58,6 +58,7 @@ int main(int argc, char **argv) { for (;;) { offset += len; len = fread(buf, 1, sizeof(buf), file); + if (!len) break; if ((flags & FLAG_SKIP) && len == sizeof(buf)) { static bool skip = false; -- cgit 1.4.1