This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]