summaryrefslogtreecommitdiff
path: root/foomaticrip.c
diff options
context:
space:
mode:
Diffstat (limited to 'foomaticrip.c')
-rw-r--r--foomaticrip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/foomaticrip.c b/foomaticrip.c
index 37d0822..2db5cb8 100644
--- a/foomaticrip.c
+++ b/foomaticrip.c
@@ -937,7 +937,7 @@ int print_file(const char *filename, int convert)
}
}
- n = fread(buf, 1, sizeof(buf), file);
+ n = fread(buf, 1, sizeof(buf) - 1, file);
buf[n] = '\0';
type = guess_file_type(buf, n, &startpos);
if (startpos > 0) {