From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Obscure overflow with very long path; completion
Date: Sat, 21 May 2005 18:42:27 +0000 [thread overview]
Message-ID: <1050521184227.ZM9438@candle.brasslantern.com> (raw)
In-Reply-To: <20050508004115.GA11683@primenet.com.au>
On May 8, 10:41am, Geoff Wing wrote:
} Subject: Re: Obscure overflow with very long path; completion
}
} On Saturday 2005-05-07 16:23 +1000, Bart Schaefer output:
} :Try this patch?
}
} Quick response. Haven't investigated.
}
} % cd /tmp
} % for I in {1..100}; mkdir aaaaaaaaaaaaaaaaaaaa && cd aaaaaaaaaaaaaaaaaaaa
} MEM: allocation error at sbrk.
} zsh: fatal error: out of memory
Hmm.
I finally had a chance to gdb-trace this, and although I only get it to
crash -- in finddir() -- with 500 levels of directory and only when I
"setopt chaselinks", I think my patch is incomplete even for xsymlinks().
Potential problems are in:
zexecve exec.c 357 via exec.c 590
execute exec.c 560
findcmd exec.c 643 (if $path contains a long path)
xsymlinks utils.c 340
finddir utils.c 500
There are a number of other places that use PATH_MAX, but they all seem
(from examination, not rigorous testing) to check for overflow.
prev parent reply other threads:[~2005-05-21 18:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-01 11:44 David Remahl
2005-05-03 10:26 ` Peter Stephenson
2005-05-06 4:10 ` Geoff Wing
2005-05-07 16:23 ` Bart Schaefer
2005-05-08 0:41 ` Geoff Wing
2005-05-21 18:42 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1050521184227.ZM9438@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).