This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFA] Correct problem in s390-opc.tab generation
- From: "Andreas Krebbel" <krebbel at linux dot vnet dot ibm dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: binutils at sourceware dot org, schwidefsky at de dot ibm dot com
- Date: Thu, 30 Sep 2010 12:53:45 +0200
- Subject: Re: [RFA] Correct problem in s390-opc.tab generation
- References: <000c01cb5fec$83e38e00$8baaaa00$@muller@ics-cnrs.unistra.fr>
On Wed, Sep 29, 2010 at 05:39:33PM +0200, Pierre Muller wrote:
> Using
> s390-opc.tab generation leads to errors
> due to longer description fields:
>
> The longest description is 72 char long,
> while s390-mkopc.c has a description array of size 60,
> without any length limitation.
> This leads to format array overwriting and uncompilable
> code...
>
> This is how I compute the longest description line:
> $ cat s390-opc.txt | gawk -F '"' '{print $2}' |wc -L
> 72
>
> Proposed patch:
> 1) Increase sdescription size to 80
> 2) Add a limitation that will generate a failure
> in the sscanf routine rather than creating trash.
>
> About point 2) I am not sure that adding a length
> to that sscanf construct is supported by all scanners...
>
> Is this OK?
I think this is the correct fix. Please apply.
Thanks!
Bye,
-Andreas-