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

Re: Bug#245974: zsh: export LC_ALL=da_DK causes segfault



Clint Adams wrote:
> > Seems that when LC_TIME (or LC_ALL or LANG) is set to a locale such as
> > da_DK or de_DE, wherein am_pm is set to null strings, zsh will segfault
> > upon prompt-expanding %p or %P.  Seems that the first argument to
> 
> So, when am_pm is set to null strings, strftime() with format "%p" or
> "%P" will return 0, which zsh is ill-equipped to handle.
> The following patch avoids the segfault.  I hope there's a better way to
> do this.

Yes, the right way to do it is to handle `0' properly, which says the
array is in an indeterminate state and hence the shell should tidy up.
The current patch is not the right way to do it.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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