[RFA] Correct problem in s390-opc.tab generation

Andreas Krebbel krebbel@linux.vnet.ibm.com
Thu Sep 30 10:53:00 GMT 2010


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-



More information about the Binutils mailing list