Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZSH 2.5.03 BUS ERROR

>2) cd /tmp
>3) mkdir xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>4) cd  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>5) go to step 3 and repeat until crash
>You may know about this already. The problem is in the file zle_misc.c,
>the function putprompt. buf0, buf1, and buf2, which apparently store
>the prompt string, are hardcoded to a length of 256. If your prompt
>happens to contain more than 256 characters, it will attempt to write
>into strange areas of memory. Ideally, the buffers should be
>dynamically allocated, or at least stradd and tstradd should check to
>make sure they're not going too far.
>The quick fix is to up the maximum prompt length, say to MAXPATHLEN*2,
>which should be more than sufficient. However, if you perform the same
>steps outlined above, it still crashes, apparently due to the path
>string having a length greater than MAXPATHLEN.

The prompt problem has been fixed.  Patches are available (and should
be in the next release) which make the prompt buffers be dynamically
allocated.  The general problem of pathnames exceeding MAXPATHLEN is
still a problem -- I plan to fix it, but there are a *lot* of
fixed-size buffers for pathnames.


Messages sorted by: Reverse Date, Date, Thread, Author