Skip to content

Correct the parsing of /n COFF lib headers - #94

Merged
dra27 merged 1 commit into
ocaml:masterfrom
dra27:xfghash
Nov 29, 2021
Merged

dra27 merged 1 commit into
ocaml:masterfrom
dra27:xfghash

Conversation

@dra27

@dra27 dra27 commented Oct 9, 2021

Copy link
Copy Markdown
Member

COFF defines any archive header beginning with / as special. Before, we assumed that if the header was neither / nor // then it must be /n and parsed accordingly. That breaks with the new /<XFGHASH>/ header in the Windows 11 SDK.

The fact the new header begins with / means it should not just be interpreted as an object - the solution I've gone with here is to harden the parsing of /n to ignore headers where n is not a positive decimal integer.

COFF defines any archive header beginning with / as special. Before, we
assumed that if the header was neither / nor // then it must be /n and
parsed accordingly. That breaks with the new /<XFGHASH>/ header. Harden
the parsing code to allow these new header to be correctly skipped.
@dra27
dra27 merged commit a38e13c into ocaml:master Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant