Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
hang in brace expansion
- X-seq: zsh-workers 33037
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: hang in brace expansion
- Date: Wed, 20 Aug 2014 23:37:49 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Dqnr8FdA4HAXxvW4W5mR34DJGft7R9+IZHJQBQS6ChQ=; b=uOYKHfAZN1EdyAi81JH4N1Yeom1LxRuR76OH/N04FhB+fOOmNypvsqMsVFLiy6wBrN VvYxoBZq3sg+eDORaJ4ETrJ5MKRwr3i7hbQ7+Fi2cyfDdvEpjJM4l+kaeRKYTJx9tp1x TAyPVEYOORzlNKBNMAgoNeV6JM06rsn+TvTtIFHVvn4l8CcnlC4e2BpTXSmDEWQA4eJJ YECPmWufLl4YS3pYi3WyWXIdPMWq6lT6UOK4NQWUJ2O2bBRT+Y+5SuPcfPh9K2T9Hs1Q 4vsj5fMuhxOxdG9/lt6+GOSnI2ellAgQhMZbPkrd4EoFLNxpmh6QNjdMdPEa5cTdkq1/ 9xrw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Doing {^@..a} will hang indefinitely (where ^@ is a literal null
character). The problem is in xpandbraces in glob.c,
for (; cend >= cstart; cend--) {
cend and cstart are unsigned types and cstart is 0. I'm a bit tired at
the moment so I can't figure out a nice way to write this loop that
always works. The value cend is used inside the loop, cstart isn't. I
suppose we could just add if (cend == 0) break; at the last line of
the loop?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author