Skip to content

Define ENCLAVE_SHORT_ID_LENGTH and ENCLAVE_LONG_ID_LENGTH - #42

Merged
yunzheng merged 2 commits into
mainfrom
fix-enclave-id-length
Nov 17, 2026
Merged

yunzheng merged 2 commits into
mainfrom
fix-enclave-id-length

Conversation

@yunzheng

Copy link
Copy Markdown
Member

The software enclave definitions in c_pe.py use these constants from winnt.h, but they were never defined. Before dissect.cstruct 5.0.dev16, the array sizes that use them were silently left unresolved, which gave IMAGE_ENCLAVE_IMPORT and IMAGE_ENCLAVE_CONFIG32/64 a dynamic size. Since fox-it/dissect.cstruct#184, loading the definition fails instead.

Fixes #41

The software enclave definitions in c_pe.py use these constants from
winnt.h, but they were never defined. Before dissect.cstruct 5.0.dev16,
the array sizes that use them were silently left unresolved, which gave
IMAGE_ENCLAVE_IMPORT and IMAGE_ENCLAVE_CONFIG32/64 a dynamic size.
Since fox-it/dissect.cstruct#184, loading the definition fails instead.

Fixes #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yunzheng
yunzheng requested a review from Schamper November 17, 2026 15:44
@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.85%. Comparing base (0dbfe91) to head (ca49b73).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   81.85%   81.85%           
=======================================
  Files          24       24           
  Lines        1659     1659           
=======================================
  Hits         1358     1358           
  Misses        301      301           
Flag Coverage Δ
unittests 81.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread dissect/executable/pe/c_pe.py Resolved
@yunzheng
yunzheng requested a review from Schamper November 17, 2026 21:11
@yunzheng
yunzheng merged commit 1d0c8a1 into main Nov 17, 2026
23 checks passed
@yunzheng
yunzheng deleted the fix-enclave-id-length branch November 17, 2026 21:17
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.

Identifier 'IMAGE_ENCLAVE_SHORT_ID_LENGTH' does not resolve to an integer

2 participants