[PATCH] windres: ignore trailing data at end of version block
Nick Clifton
nickc@redhat.com
Fri Mar 12 15:19:58 GMT 2021
Hi Mark,
> This changes bin_to_res_version so that it only considers the number of bytes
> specified in the VS_VERSION_INFO header, rather than the potentially larger
> value in IMAGE_RESOURCE_DATA_ENTRY.
Please could you file a bug report for this issue:
https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils
> It seems recent versions of Microsoft's resource compiler have taken to adding
> 16 padding bytes in there, leading to spurious fatal errors of
> "nul bytes found in version string".
It looks like there is already code to handle this, but it is only
expecting 8 bytes of padding:
else if (ch == 0)
{
if (length == 8)
/* Padding - skip. */
break;
fatal (_("nul bytes found in version string"));
So maybe what needs to happen is to extend this test to allow for 16
padding bytes.
Cheers
Nick
More information about the Binutils
mailing list