X-Spam-Check-By: sourceware.org Date: Wed, 15 Mar 2006 15:43:57 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Memory leak in vsnprintf Message-ID: <20060315204357.GA5440@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <44187B91 DOT 3070801 AT usa DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44187B91.3070801@usa.net> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Wed, Mar 15, 2006 at 02:39:45PM -0600, Paul Mattes wrote: >I believe I have found a memory leak in the Cygwin version of >vsnprintf(). If it is called with a NULL 'str' parameter and a 0 >'length', it leaks a BUFSIZ-sized buffer. (Per C99 and SUSv3, calling >vsnprintf() with a NULL 'str' and 0 'length' is a way to find out how >big the formatted string would be without actually storing it anywhere.) > >I see that Cygwin's vsnprintf() comes from newlib. Should I report this >to them instead? Yes. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/