freebsd-dev/bin/sh
Kyle Evans b63d2d683d sh: fix read builtin on 32-bit systems
Specifically, any system with a 32-bit size_t; -residue is calculated as a
32-bit *then* promoted to the 64-bit off_t and the result is ultimately
wrong. This resulted in what would appear to be truncated output, as only
the first line would be read.

Correct it by just making residue an off_t to begin with, since this is what
lseek will take anyways.

Reported by:	antoine, dim
Triaged by:	cem
Tested by:	kevans
X-MFC-With:	r358152
2020-02-22 03:14:05 +00:00
..
bltin
funcs
tests
alias.c
alias.h
arith_yacc.c
arith_yacc.h
arith_yylex.c
arith.h
builtins.def
cd.c
cd.h
dot.profile
dot.shrc
error.c
error.h
eval.c
eval.h
exec.c
exec.h
expand.c
expand.h
histedit.c
input.c
input.h
jobs.c
jobs.h
mail.c
mail.h
main.c
main.h
Makefile
Makefile.depend
memalloc.c
memalloc.h
miscbltin.c sh: fix read builtin on 32-bit systems 2020-02-22 03:14:05 +00:00
mkbuiltins
mknodes.c
mksyntax.c
mktokens
myhistedit.h
mystring.c
mystring.h
nodes.c.pat
nodetypes
options.c
options.h
output.c
output.h
parser.c
parser.h
profile
redir.c
redir.h
sh.1
shell.h
show.c
show.h
TOUR
trap.c
trap.h
var.c
var.h