This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2337] libio in wide mode deallocates user supplied buffer
- From: "cvs-commit at gcc dot gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 12 Jan 2007 17:26:00 -0000
- Subject: [Bug libc/2337] libio in wide mode deallocates user supplied buffer
- References: <20060214170527.2337.Petr.Salinger@seznam.cz>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2007-01-12 17:25 -------
Subject: Bug 2337
CVSROOT: /cvs/glibc
Module name: libc
Branch: glibc-2_5-branch
Changes by: jakub@sourceware.org 2007-01-12 17:25:39
Modified files:
. : ChangeLog
libio : Makefile fileops.c genops.c libio.h
wfiledoalloc.c wgenops.c wmemstream.c wstrops.c
Added files:
libio : tst-setvbuf1.c
Log message:
[BZ #2337]
* libio/Makefile (tests): Add tst-setvbuf1.
* libio/tst-setvbuf1.c: New file.
[BZ #2337]
* libio/genops.c (__uflow): Fix a typo.
* libio/wfiledoalloc.c (_IO_wfile_doallocate): Don't stat
nor set _IO_LINE_BUF bit here. Size the wide buffer based on
the narrow buffer size.
[BZ #2337]
* libio/libio.h (_IO_FLAGS2_USER_WBUF): Define.
* libio/wgenops.c (_IO_wsetb, _IO_wdefault_finish): Test and set
_IO_FLAGS2_USER_WBUF bit in _flags2 instead of _IO_USER_BUF bit
in _flags.
* libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf,
_IO_wstr_finish): Likewise.
* libio/wmemstream.c (open_wmemstream): Likewise.
* libio/fileops.c (_IO_new_file_close_it): Call _IO_set[bgp]
even for wide streams.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.10362.2.21&r2=1.10362.2.22
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/tst-setvbuf1.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=NONE&r2=1.1.4.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/Makefile.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.86&r2=1.86.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/fileops.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.110&r2=1.110.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/genops.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.70&r2=1.70.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/libio.h.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.64&r2=1.64.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/wfiledoalloc.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.6&r2=1.6.8.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/wgenops.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.14&r2=1.14.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/wmemstream.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.3&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/wstrops.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.11&r2=1.11.2.1
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2337
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.