diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-09-29 02:11:19 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-09-29 02:11:19 +0200 |
commit | 3b4d04b77eb5cfdb8ac6a799a3f3ccf1e455d0e7 (patch) | |
tree | f7486abff328ee79831a4c4ee6cc006a11006dc8 /console-tools/chvt.c | |
parent | 78c9c736ab13caec3f6c1032e39200fed5580f50 (diff) | |
download | busybox-3b4d04b77eb5cfdb8ac6a799a3f3ccf1e455d0e7.tar.gz |
ash: input: Allow two consecutive calls to pungetc
Upstream commit:
input: Allow two consecutive calls to pungetc
The commit ef91d3d6a4c39421fd3a391e02cd82f9f3aee4a8 ([PARSER]
Handle backslash newlines properly after dollar sign) created
cases where we make two consecutive calls to pungetc. As we
don't explicitly support that there are corner cases where you
end up with garbage input leading to undefined behaviour.
This patch adds explicit support for two consecutive calls to
pungetc.
Reported-by: Jilles Tjoelker <jilles@stack.nl>
Reported-by: Juergen Daubert <jue@jue.li>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
In bbox case, bashism >& may need two pungetc() too.
function old new delta
pgetc 514 555 +41
pushstring 114 144 +30
basepf 52 76 +24
popstring 134 151 +17
parse_command 1584 1585 +1
pungetc 12 9 -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/1 up/down: 113/-3) Total: 110 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'console-tools/chvt.c')
0 files changed, 0 insertions, 0 deletions