1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Another lexical fix for here-documents (re: 6e515f1d)

OpenSUSE patch from:
https://build.opensuse.org/package/view_file/shells/ksh/ksh93-heredoc.dif

src/cmd/ksh93/sh/lex.c: here_copy():
- Do not potentially seek back a zero or negative length.
This commit is contained in:
Martijn Dekker 2021-01-28 06:32:42 +00:00
parent 4604df9ada
commit 674a0c3559

View file

@ -1891,6 +1891,8 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
sfputc(sp,'\\');
}
}
if(LEN < 1)
LEN = 1;
bufp = fcseek(-LEN);
}
else