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

Fix crash on long PS1 prompt (Solaris patch 195-17824699)

Original report and info:
https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01677.html
https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01679.html

Patch pulled in from:
https://raw.githubusercontent.com/oracle/solaris-userland/master/components/ksh93/patches/195-17824699.patch

src/cmd/ksh93/edit/edit.c: ed_setup():
- Prevent the ed_setup() function from writing past ep->e_prompt,
  which is set to the local char prompt[PRSIZE] variable in
  ed_emacsread().

src/cmd/ksh93/include/edit.h:
- Increase maximum prompt size, PRSIZE, to 256.
This commit is contained in:
Martijn Dekker 2021-01-08 22:15:48 +00:00
parent 86fc4c6d0a
commit 1de20d65a8
4 changed files with 9 additions and 3 deletions

View file

@ -59,7 +59,7 @@
#endif /* SHOPT_MULTIBYTE */
#define TABSIZE 8
#define PRSIZE 160
#define PRSIZE 256
#define MAXLINE 1024 /* longest edit line permitted */
typedef struct _edit_pos