artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a8fcba
)
If reading into buffer, correct the stored file size at EOF, we don't
author
nicm
<nicm@openbsd.org>
Fri, 29 May 2015 11:03:37 +0000
(11:03 +0000)
committer
nicm
<nicm@openbsd.org>
Fri, 29 May 2015 11:03:37 +0000
(11:03 +0000)
want to look at any garbage that might already be in the buffer after
that. From Sebastien Marie.
usr.bin/file/file.c
patch
|
blob
|
history
diff --git
a/usr.bin/file/file.c
b/usr.bin/file/file.c
index
961b771
..
7402fa0
100644
(file)
--- a/
usr.bin/file/file.c
+++ b/
usr.bin/file/file.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: file.c,v 1.4
0 2015/05/29 07:30:28
nicm Exp $ */
+/* $OpenBSD: file.c,v 1.4
1 2015/05/29 11:03:37
nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@
-395,7
+395,7
@@
fill_buffer(struct input_file *inf)
next = (char *)next + got;
left -= got;
}
-
+ inf->size -= left;
return buffer;
}