mbox series

[0/3] ungetc fixes for BZ #27821

Message ID 20240814233534.1469084-1-siddhesh@sourceware.org
Headers show
Series ungetc fixes for BZ #27821 | expand

Message

Siddhesh Poyarekar Aug. 14, 2024, 11:35 p.m. UTC
Fix an uninitialized read and a leak that can be seen with ungetc
operating on an unused stream.

Siddhesh Poyarekar (3):
  Make tst-ungetc use libsupport
  ungetc: Fix uninitialized read when putting into unused streams [BZ
    #27821]
  ungetc: Fix backup buffer leak on program exit [BZ #27821]

 libio/genops.c                 |   8 ++-
 libio/libioP.h                 |   4 +-
 manual/stdio.texi              |   8 +--
 stdio-common/Makefile          |   7 ++
 stdio-common/tst-ungetc-leak.c |  32 +++++++++
 stdio-common/tst-ungetc.c      | 114 +++++++++++++++++----------------
 6 files changed, 110 insertions(+), 63 deletions(-)
 create mode 100644 stdio-common/tst-ungetc-leak.c