Skip to content

Fix crash on print --all for ZenUtils patches + minor improvements#341

Open
rolbk wants to merge 4 commits intogoogle:masterfrom
rolbk:master
Open

Fix crash on print --all for ZenUtils patches + minor improvements#341
rolbk wants to merge 4 commits intogoogle:masterfrom
rolbk:master

Conversation

@rolbk
Copy link
Copy Markdown

@rolbk rolbk commented Mar 3, 2026

Fixes a segfault when disassembling certain ZenUtils microcode patches with print --all. The crash happened in crypt_signed_hash because mpz_export returns NULL when the operand is zero, and the result was used without a null check.

Also includes:

  • Corrected match register addressing in the intro.md with the understanding from last week's discussion
  • Added "global" to the --verbose flag description, since we've stumbled over its scope a few times (wording suggestions welcome)

@matrizzo matrizzo self-assigned this Mar 6, 2026
"hooking" than "patching".

These hooks can't be placed freely in patch RAM though -- they are arranged in
fixed slots (called quads), and match register N will (almost) always redirect
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost? When is this not the case?

Copy link
Copy Markdown
Author

@rolbk rolbk May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline: quad 0x56 is the entry point when --hdr-autorun=true, but it's not reachable via a match register, so the "always redirects to quad 2N" rule holds for match registers. Removed the "(almost)" and rebased.

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.

2 participants