public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "heiko dot nardmann at secunet dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/2072] New: memory leak in stdio-common/printf_fp.c
Date: Tue, 20 Dec 2005 13:23:00 -0000	[thread overview]
Message-ID: <20051220132257.2072.heiko.nardmann@secunet.com> (raw)

In stdio-common/printf_fp.c there are some locations (handling error  
situations) in function _printf_fp() where the deallocation of memory for  
wbuffer is not handled. E.g. the macros PADN() und outchar() return to caller  
without checking wbuffer. I'm not sure whether this is intentionally done or  
not.  
  
#define outchar(ch)							      \  
  do									      \  
    {									      \  
      register const int outc = (ch);					      \  
      if (putc (outc, fp) == EOF)					      \  
	return -1;							      \  
      ++done;								      \  
    } while (0)  
  
#define PADN(ch, len)							      \  
  do									      \  
    {									      \  
      if (PAD (fp, ch, len) != len)					      \  
	return -1;							      \  
      done += len;							      \  
    }									      \  
  while (0)

-- 
           Summary: memory leak in stdio-common/printf_fp.c
           Product: glibc
           Version: 2.3.6
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: heiko dot nardmann at secunet dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2072

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


             reply	other threads:[~2005-12-20 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-20 13:23 heiko dot nardmann at secunet dot com [this message]
2006-01-15 16:26 ` [Bug libc/2072] " aj at suse dot de
2006-04-25 18:39 ` drepper at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051220132257.2072.heiko.nardmann@secunet.com \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).