From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from acme.spoerlein.net (acme.spoerlein.net [88.198.49.12]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p2BKg54g006479 for ; Fri, 11 Mar 2011 15:42:07 -0500 (EST) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p2BKg4pQ004978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Mar 2011 21:42:04 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1299876124; bh=hS1fMTe96NN+ym3JOywLa6OUQ53hLfIZvUgg9c3B+oo=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=e8WZHUoF9DfuYOKBwwXmdi5hjFnY+1yJzwz6Og3KpwYsC7KnJ/otPOhMXpLzDA6wt deeMcIa50Bm56qkyGylhFYhux6xf+l6oQMC0WD1i7fD3TcAdsy3REKxozmkQabXa+p AmOn20goDvaI6WpvxwsbWtS2dT38P8mGxGop3114= Date: Fri, 11 Mar 2011 21:42:04 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: discuss@mdocml.bsd.lv Subject: Logic error in mandoc.c time2a() Message-ID: <20110311204204.GA85668@acme.spoerlein.net> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, now that the clang/llvm folks unbroke their static analysis tool again, I had another run on the mdocml sources. Only one bug stood out (disregard the 'Dead store' class). See https://www.spoerlein.net/scan-build/mdocml/2011-03-11-1/ In time2a(), 'buf' is a stack-local buffer and its address will be returned. Oops. Either make it global, static, use malloc/free, or have the caller provide the buffer, not sure which solution you guys would prefer. Uli -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv