This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Tom Tromey <tromey at redhat dot com>, Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- Date: Wed, 13 Nov 2013 09:10:08 +0100
- Subject: Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W32B887B9B78C252A2B9146E40B0 at phx dot gbl> <20131031144309 dot GR27813 at tucnak dot zalov dot cz> <87y559xz7y dot fsf at redhat dot com> <20131031173649 dot GW27813 at tucnak dot zalov dot cz> <87zjpbb5qu dot fsf at redhat dot com> <20131111142159 dot GZ27813 at tucnak dot zalov dot cz> <878uwuap4f dot fsf at redhat dot com> <878uwt63e2 dot fsf at redhat dot com> <DUB122-W11E7FE6263E9AF426B4F90E4FE0 at phx dot gbl> <877gcc4vzs dot fsf at redhat dot com> <DUB122-W41103324C30066CF0AA665E4F90 at phx dot gbl>
Sorry, I missed one question in the previous email.
Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
> and what is it if there is no terminal '\n' ?
In that case it's that the entire file is made of one line. For that
case get_next_line has allocated enough space for one
byte-passed-the-end of the file, so that there is no buffer overflow
here.
--
Dodji