This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix overflow of -b switch
- From: "Jie Zhang" <jzhang918 at gmail dot com>
- To: "Bernd Schmidt" <bernds_cb1 at t-online dot de>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 7 Nov 2006 22:29:05 +0800
- Subject: Re: [PATCH] Fix overflow of -b switch
- References: <email@example.com> <45505B22.firstname.lastname@example.org>
On 11/7/06, Bernd Schmidt <email@example.com> wrote:
Thanks. Checked in on 4.1 and 4.2 branches and trunk.
Jie Zhang wrote:
> process_command () scans command line twice. The first time it just
> counts how many switches. Then the switches vector is created
> according to the count. The second time it copies the text of each
> switch and stores a pointer to the copy in the vector of switches.
> Currently, the first scan does not count -b if its argument has no
> dash. So the switches vector has no enough space for all switches and
> is overflowed when the second scan tries to store the pointers.
> * gcc.c (process_command): Treat -b as normal switch if its argument
> has no dash.
Ok if regtest successful.