From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20620 invoked by alias); 26 Feb 2010 14:45:04 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 14898 Received: (qmail 10053 invoked from network); 26 Feb 2010 14:45:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Fri, 26 Feb 2010 15:44:59 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: segfault in strftime Message-ID: <20100226144459.GD13766@prunille.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <201002261303.o1QD3Sqq018901@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201002261303.o1QD3Sqq018901@news01.csr.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.20-6045-vl-r30587 (2010-02-23) 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 - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)