Skip to content

Fix PE icon embedding (rcedit /I parity) and stale cert parsing - #3

Merged
dominicletz merged 2 commits into
masterfrom
fix/stale-certificate-table
Sep 1, 2026
Merged

Fix PE icon embedding (rcedit /I parity) and stale cert parsing#3
dominicletz merged 2 commits into
masterfrom
fix/stale-certificate-table

Conversation

@dominicletz

@dominicletz dominicletz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat out-of-bounds Authenticode certificate directories as unsigned (avoids binary_part/3 crash after rcedit).
  • Implement proper --set-icon / --get-icon via LibPE.ICO + LibPE.Icon (RT_GROUP_ICON + RT_ICON payloads matching WinRun4J rcedit /I).
  • Ensure new .rsrc sections get INITIALIZED_DATA | MEM_READ characteristics.
  • Bump to 1.3.0; add ICO/set-icon/PE validity tests with rcedit golden fixtures.
  • Repair CI: Erlang Solutions apt packages are gone on ubuntu-latest; use erlef/setup-beam.

Test plan

  • mix test (13 tests) locally
  • CI green on this PR

dominicletz and others added 2 commits August 31, 2026 22:21
rcedit can leave a certificate data directory that points past the
file; treat that as unsigned instead of crashing binary_part/3 during
mix pe.update.

Co-authored-by: Cursor <cursoragent@cursor.com>
Implement LibPE.ICO / LibPE.Icon so --set-icon writes RT_GROUP_ICON +
RT_ICON payloads (WinRun4J rcedit /I semantics), bump to 1.3.0, and add
golden/structure tests. Replace the broken Erlang Solutions apt install
in CI with erlef/setup-beam so mix test can run on ubuntu-latest.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dominicletz dominicletz changed the title Ignore stale PE certificate directories when parsing Fix PE icon embedding (rcedit /I parity) and stale cert parsing Sep 1, 2026
@dominicletz
dominicletz merged commit ccb3eff into master Sep 1, 2026
2 checks passed
@dominicletz
dominicletz deleted the fix/stale-certificate-table branch September 1, 2026 07:49
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