Skip to content

prog: add support for decimal arguments in text format#6899

Merged
ramosian-glider merged 1 commit intogoogle:masterfrom
ramosian-glider:syz-aflow-100326
Mar 10, 2026
Merged

prog: add support for decimal arguments in text format#6899
ramosian-glider merged 1 commit intogoogle:masterfrom
ramosian-glider:syz-aflow-100326

Conversation

@ramosian-glider
Copy link
Member

Previously, the parser only expected the '0' character to begin an integer argument, which effectively meant it only handled hexadecimal formatting (e.g., 0x...) when parsing arguments.

This change modifies parseArgImpl() to route any starting digit ('0'-'9') to the integer parsing logic. Since strconv.ParseUint already handles base-10 parsing using the "0" base flag, this cleanly enables the parser to natively deserialize decimal arguments.


Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md


a-nogikh
a-nogikh previously approved these changes Mar 10, 2026
Copy link
Collaborator

@a-nogikh a-nogikh left a comment

Choose a reason for hiding this comment

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

Previously, the parser only expected the '0' character to begin an integer
argument, which effectively meant it only handled hexadecimal formatting
(e.g., `0x...`) when parsing arguments.

This change modifies parseArgImpl() to route any starting digit ('0'-'9')
to the integer parsing logic. Since `strconv.ParseUint` already handles
base-10 parsing using the "0" base flag, this cleanly enables the parser
to natively deserialize decimal and octal arguments.
@ramosian-glider
Copy link
Member Author

Let's maybe update https://github.com/google/syzkaller/blob/master/docs/program_syntax.md as well?

Done

@ramosian-glider ramosian-glider added this pull request to the merge queue Mar 10, 2026
Merged via the queue into google:master with commit 9eee858 Mar 10, 2026
20 checks passed
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.

3 participants