Skip to content

fix(logs): respect printf length modifiers in params#1752

Open
jpnurmi wants to merge 5 commits into
masterfrom
jpnurmi/fix/log-args
Open

fix(logs): respect printf length modifiers in params#1752
jpnurmi wants to merge 5 commits into
masterfrom
jpnurmi/fix/log-args

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented May 25, 2026

Fix structured log parameter extraction to respect printf argument widths.

The previous parser always consumed integer variadic arguments as 64-bit values, even for default-width specifiers like %d and %u. On 32-bit platforms this can read adjacent stack data, desynchronize later arguments, and serialize leaked or corrupted values into log attributes.

This also consumes dynamic width and precision arguments so formats like %*d stay aligned with the underlying va_list.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7ae8309. Configure here.

Comment thread src/sentry_logs.c Outdated
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