1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00
freebsd/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 sh: Test that executing various binary files is rejected 2019-12-30 21:32:55 +00:00
alias.c
alias.h
arith_yacc.c sh: Restore $((x)) error checking after fix for $((-9223372036854775808)) 2019-02-10 22:23:05 +00:00
arith_yacc.h sh: Restore $((x)) error checking after fix for $((-9223372036854775808)) 2019-02-10 22:23:05 +00:00
arith_yylex.c sh: Restore $((x)) error checking after fix for $((-9223372036854775808)) 2019-02-10 22:23:05 +00:00
arith.h
builtins.def
cd.c sh: Fix rare memory leak with SIGINT 2020-01-01 12:06:37 +00:00
cd.h
dot.profile Install .shrc for root, and set PS1 for the toor account. 2019-01-24 23:34:51 +00:00
dot.shrc Comment out the default sh(1) aliases for root, introduced in r343416. 2019-01-25 17:09:26 +00:00
error.c sh: Unify EXERROR and EXEXEC 2018-11-09 14:58:24 +00:00
error.h sh: Unify EXERROR and EXEXEC 2018-11-09 14:58:24 +00:00
eval.c sh: Unify EXERROR and EXEXEC 2018-11-09 14:58:24 +00:00
eval.h
exec.c sh: Unify EXERROR and EXEXEC 2018-11-09 14:58:24 +00:00
exec.h sh: Use exitstatus instead of exerrno to pass EXEXEC status 2018-10-27 20:17:57 +00:00
expand.c sh: Fix ${param?} default error message 2018-11-28 20:03:53 +00:00
expand.h
histedit.c Do not use our custom completion function, it is not needed anymore 2019-09-16 07:31:59 +00:00
input.c sh: Use 126 and 127 exit status for failures opening a script 2018-11-27 21:49:59 +00:00
input.h
jobs.c sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
jobs.h
mail.c sh: Don't use padvance() for MAIL/MAILPATH 2018-07-15 09:14:30 +00:00
mail.h
main.c sh: Unify EXERROR and EXEXEC 2018-11-09 14:58:24 +00:00
main.h
Makefile Fix .depend files to work for build tools. 2019-06-15 17:08:13 +00:00
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 sh: Split CNL syntax category to avoid a check on state[level].syntax 2018-05-21 21:52:48 +00:00
mktokens
myhistedit.h
mystring.c
mystring.h
nodes.c.pat
nodetypes
options.c
options.h sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
output.c sh: Send normal output from bind builtin to stdout 2019-02-19 21:27:30 +00:00
output.h sh: Send normal output from bind builtin to stdout 2019-02-19 21:27:30 +00:00
parser.c Make sh(1) support \u in PS1. This removes one fork/exec on interactive 2019-01-24 11:59:46 +00:00
parser.h
profile Don't mess with BLOCKSIZE in shell startup files - it's set by login.conf(5); 2019-01-20 22:08:49 +00:00
redir.c
redir.h
sh.1 sh: Add set -o pipefail 2019-02-24 21:05:13 +00:00
shell.h sh: Restore $((x)) error checking after fix for $((-9223372036854775808)) 2019-02-10 22:23:05 +00:00
show.c
show.h
TOUR sh: Unify EXERROR and EXEXEC 2018-11-09 14:58:24 +00:00
trap.c
trap.h
var.c sh: Do not place exported but unset variables into the environment 2019-01-03 20:22:35 +00:00
var.h