summary refs log tree commit diff
Commit message (Collapse)AuthorAge
...
* Remove git push configJune McEnroe2016-03-31
| | | | Git 2.8 finally stops yelling at you if you haven't set it.
* Map nohlsearch to default <leader><leader>June McEnroe2016-03-15
|
* Set splitbelow splitrightJune McEnroe2016-02-23
|
* Revert "Enable nvim set cursor shape"June McEnroe2016-02-19
| | 2009-11-26 11:55:22 +0800
commit72811e307d07c8e5902a7f73ea6491eabb93a4ce (patch)
treec3ef82b76504bd0862d91db7484ec7008bb3c156 /src/bltin/test.c
parent[PARSER] Fix syntax array size (diff)
downloaddash-72811e307d07c8e5902a7f73ea6491eabb93a4ce.tar.gz
dash-72811e307d07c8e5902a7f73ea6491eabb93a4ce.zip
[BUILTIN] Fix off-by-one recordregion in readcmd
Alexey Gladkov <gladkov.alexey@gmail.com> wrote:
>
> I found another example:
>
> $ tr -d '[:print:]' < /etc/passwd |tr -d '\t\n' |wc -c
> 0
>
> $ dash -c 'while read o p; do printf "[%s] [%s]\n" "$o" "$p"; done <
> /etc/passwd' |tr -d '[:print:]' |tr -d '[:space:]' |wc -c
> 61
>
> bug is not fixed yet :(

This bug is caused by an off-by-one error in the recordregion
call in readcmd.  It included the terminating NUL in the region
which causes ifsbreakup to include the string after it for scanning.

Setting the correct length fixes the problem.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
tr class='logheader'>* Update configurations list in readmeJune McEnroe2016-02-05 | * Move gitconfigJune McEnroe2016-02-05 | * Add nvim configurationJune McEnroe2016-02-05 | * More iTerm configuration tweaksJune McEnroe2016-02-04 | * Update to iTerm 2.9 betaJune McEnroe2016-02-03 | * Spawn non-login shells in iTermJune McEnroe2016-01-31 | * Remove linux gvim aliasJune McEnroe2016-01-28 | * Rewrite zshrcJune McEnroe2016-01-28 | * Strip out useless commentsJune McEnroe2016-01-28 | * Trim tmux configurationJune McEnroe2016-01-28 | * Remove psql format wrappedJune McEnroe2016-01-28 | * Wow, that is so annoying, gitJune McEnroe2016-01-25 | * Clean up .gitconfigJune McEnroe2016-01-25 | * Remove gitignoreJune McEnroe2016-01-15 | * Eliminate escape key delay in zshJune McEnroe2016-01-15 | * Move pretty git log format to .gitconfigJune McEnroe2016-01-15 | * Remove unused git aliasesJune McEnroe2016-01-14 | * Hash SSH known hostsJune McEnroe2016-01-06 | * Ignore directory .swp filesJune McEnroe2015-12-30 | * Color prompt yellow in vi normal modeJune McEnroe2015-12-16 | * Remove colorcolumn at 120June McEnroe2015-11-23 | * Always git rebase --autosquashJune McEnroe2015-11-23 | * Add inverted shift to KarabinerJune McEnroe2015-11-18 | * Clean up git configsJune McEnroe2015-11-06 | * Add prune scriptJune McEnroe2015-11-06 | * Update vendored Gruvbox colorschemeJune McEnroe2015-11-03 | * Redefine _newline_precmd in _newline_precmdJune McEnroe2015-11-02 | * Print newline before every prompt after firstJune McEnroe2015-11-02 | * Remove first prompt placementJune McEnroe2015-11-02 | * Newline before prompt and start at bottom of terminalJune McEnroe2015-11-02 | * Add chruby to zshrcJune McEnroe2015-10-27 | * Add SSH configJune McEnroe2015-10-22 | * Spawn login shells in iTermJune McEnroe2015-10-22 | * Zoom iTerm only verticallyJune McEnroe2015-07-12 | * Update iTerm2 configurationJune McEnroe2015-07-11 | * Add mkdir -p to import scriptJune McEnroe2015-07-05 | * Add license to readmeJune McEnroe2015-07-04 | * Add pathogen to vimJune McEnroe2015-07-04 | * Add send-prefix bindingJune McEnroe2015-05-28 | * Bash is usually in /binJune McEnroe2015-05-28 |