[Pkg-zsh-devel] Bug#700830: zsh: Segmentation fault triggered by /bin/zsh -fc 'print ${${:-/nonexistent}:A}'

Sam Homerson sam.homerson at gmail.com
Mon Feb 18 04:37:00 UTC 2013


Package: zsh
Version: 4.3.10-14
Severity: normal
Tags: upstream patch

Executing

        /bin/zsh -fc 'print ${${:-/nonexistent}:A}'

yields a segmentation fault in Src/hist.c, on line 1640.

This bug has already been fixed upstream in revision 1.5575 by the following
commit:

commit fe7337447c2c2f0bed3e228bb9c5a035536e7fe4
Author: Peter Stephenson <pws at users.sourceforge.net>
Date:   Wed Feb 8 09:35:17 2012 +0000

    Timothy Redaelli: file name manipulations
    in history can return NULL if HAVE_CANONICALIZE_FILE_NAME

by adding a simple check for a NULL pointer:

#ifdef HAVE_CANONICALIZE_FILE_NAME
        if (!real)
            return 0;
#endif

The bug is limited to systems that have canonicalize_file_name, i.e. Linux and
derivatives.
It is reproducible on CentOS release 6.3 (Final), but not on OS X 10.8.2 or
FreeBSD 9.1.

It would be great if  this fix could be backported to Debian stable.

Thanks!



-- System Information:
Debian Release: 6.0.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zsh depends on:
ii  libc6                     2.11.3-4       Embedded GNU C Library: Shared lib
ii  libcap2                   1:2.19-3       support for getting/setting POSIX.
ii  libncursesw5              5.7+20100313-5 shared libraries for terminal hand

Versions of packages zsh recommends:
ii  libc6                         2.11.3-4   Embedded GNU C Library: Shared lib
ii  libpcre3                      8.02-1.1   Perl 5 Compatible Regular Expressi

Versions of packages zsh suggests:
pn  zsh-doc                       <none>     (no description available)

-- no debconf information



More information about the Pkg-zsh-devel mailing list