This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2][BZ #14286] Fix integer overflow in vfwprintf.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 21 Oct 2013 15:23:06 +0200
- Subject: Re: [PATCH v2][BZ #14286] Fix integer overflow in vfwprintf.
- Authentication-results: sourceware.org; auth=none
- References: <20131021082701 dot GA22363 at domone dot podge> <mvmsivv805x dot fsf at hawking dot suse dot de> <20131021093837 dot GA23041 at domone dot podge> <mvmob6j7x0r dot fsf at hawking dot suse dot de> <20131021123821 dot GB23647 at domone dot podge> <mvmhaca9300 dot fsf at hawking dot suse dot de>
On Mon, Oct 21, 2013 at 03:18:07PM +0200, Andreas Schwab wrote:
> OndÅej BÃlka <neleai@seznam.cz> writes:
>
> > On Mon, Oct 21, 2013 at 12:12:36PM +0200, Andreas Schwab wrote:
> >> OndÅej BÃlka <neleai@seznam.cz> writes:
> >>
> >> > I copied that from case when malloc fails that if I read code
> >> > correctly does not set ENOMEM.
> >>
> >> Testcase?
> >>
> >
> > Here, nothing gets written but errno is 0.
>
> And in which way is that a valid test case?
>
When input is big for malloc to fail then it does not set errno. If
input is bigger and it trigger overflow then it would set errno to
EOVERFLOW which is inconsistent.