This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix BZ #17916 fopen unbounded stack usage for ccs= modes
- From: Florian Weimer <fweimer at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at gmail dot com>, Florian Weimer <fw at deneb dot enyo dot de>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Mon, 23 Feb 2015 14:47:57 +0100
- Subject: Re: [patch] Fix BZ #17916 fopen unbounded stack usage for ccs= modes
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobPBCpZwMyF5F_4XzNJKKi64xMGtWgBXO_iDU_HpZ6+V9g at mail dot gmail dot com> <874mqdbr1w dot fsf at mid dot deneb dot enyo dot de> <CALoOobMKYAvdj63=7JKyQTPZHx_6c_0RVTxXjcLk-_wyFYWryg at mail dot gmail dot com>
On 02/23/2015 12:31 AM, Paul Pluzhnikov wrote:
> + if (ccs == NULL)
> + return NULL;
I think you have to call _IO_file_close_it (fp) here, otherwise there's
a resource leak.
Test case change is okay, this is how we usually test for stack overflow.
--
Florian Weimer / Red Hat Product Security