[PATCH] Fix overflow of -b switch

Bernd Schmidt bernds_cb1@t-online.de
Tue Nov 7 10:08:00 GMT 2006


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.


Bernd



More information about the Gcc-patches mailing list