Skip to content

fix(shell): check argc in peek command - #117

Merged
pepedinho merged 1 commit into
Auri-OS:developfrom
frenchcast1234:fix/peek-missing-args
Aug 3, 2026
Merged

fix(shell): check argc in peek command#117
pepedinho merged 1 commit into
Auri-OS:developfrom
frenchcast1234:fix/peek-missing-args

Conversation

@frenchcast1234

Copy link
Copy Markdown
Contributor

peek reads args[1] without checking argc, so running peek with no argument dereferences NULL inside htoi.
It doesn't fault: page 0 is identity-mapped (mmu.zig:56-64), so it silently parses garbage and dumps an arbitrary address.
Adds the same argc guard already used by memdump and poke.

@pepedinho

Copy link
Copy Markdown
Contributor

thank for yout contribution to AuriOS :)

@pepedinho
pepedinho merged commit 144abac into Auri-OS:develop Aug 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants