Hi Herbert, please see
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387458

On Thu, Sep 14, 2006 at 03:50:02PM +0200, Julien Danjou wrote:
> I just found this bug which is easily reproductible:
>
> % dash -c 'command -v'
> zsh: segmentation fault  dash -c 'command -v'

---
 src/exec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/exec.c b/src/exec.c
index 417ba8a..fda4cf3 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -862,6 +862,8 @@ #ifdef DEBUG
                        abort();
 #endif
 
+       if (*argptr == NULL)
+               sh_error("arg count");
        if (verify)
                return describe_command(out1, *argptr, verify - VERIFY_BRIEF);
 
-- 
1.4.2.3


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to