Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: segfault in strftime
- X-seq: zsh-users 14898
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: segfault in strftime
- Date: Fri, 26 Feb 2010 15:44:59 +0100
- In-reply-to: <201002261303.o1QD3Sqq018901@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <A73C7D9C-66C5-4BFA-8FB3-8560FE65B529@xxxxxxxxxxx> <201002261303.o1QD3Sqq018901@xxxxxxxxxxxxxx>
On 2010-02-26 13:03:28 +0000, Peter Stephenson wrote:
> I don't see where that would cause a problem, so I'd be interested in a
> backtrace---the only place I can see it going wrong is within strtoul().
zsh doesn't check for localtime() failure in datetime.c:
t = localtime(&secs);
bufsize = strlen(argv[0]) * 8;
buffer = zalloc(bufsize);
for (x=0; x < 4; x++) {
if (ztrftime(buffer, bufsize, argv[0], t) >= 0)
break;
buffer = zrealloc(buffer, bufsize *= 2);
}
t may be null.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author