Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Obscure overflow with very long path; completion
- X-seq: zsh-workers 21269
 
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxxxxx
 
- Subject: Re: Obscure overflow with very long path; completion
 
- Date: Sat, 21 May 2005 18:42:27 +0000
 
- In-reply-to: <20050508004115.GA11683@xxxxxxxxxxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
 
- References: <DE6AE1FD-6A14-44CE-8CB2-3576B59DB5B6@xxxxxxxxx>	<200505031026.j43AQwBE014903@xxxxxxxxxxxxxx>	<slrnd7lrgo.32l.mason@xxxxxxxxxxxxxxxxx>	<1050507162306.ZM1184@xxxxxxxxxxxxxxxxxxxxxxx>	<20050508004115.GA11683@xxxxxxxxxxxxxxx>
 
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author