RFC: non-AI hardening of ld/pdb.c
Jan Beulich
jbeulich@suse.com
Fri Nov 20 11:39:31 GMT 2026
On 20.11.2026 11:05, Nick Clifton wrote:
> Hi Guys,
>
> A problem was reported a while ago with a bit of code in ld/pdb.c.
> Unfortunately it looks like an AI agent might have been used to create
> the patch to fix the issue. (We have been unbale to confirm or deny
> this). So, since I have not actually read the patch submission, I
> have gone ahead and created my own patch instead.
>
> I may however have gone slightly overboard...
>
> Looking at the code, there were several other places where similar
> integer overflows could - theoretically - occur, and so I decided to
> fix those too. Then there were some minor tidyups and code
> reformatting as well. All of which has resulted in the attached -
> human created - patch.
>
> Any comments, corrections or suggestions before I check it in ?
In many place where you use uint32_t, unsigned int might be better to use.
Imo we'd better use fixed-width types only where a fixed width is really
meant / needed.
Jan
More information about the Binutils
mailing list