Skip to content

tool_msgs: avoid null pointer deref for early errors#20967

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/early-error
Closed

tool_msgs: avoid null pointer deref for early errors#20967
bagder wants to merge 1 commit intomasterfrom
bagder/early-error

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 17, 2026

When errorf()/warnf() is used early on, before the global pointer is setup, curl would previosly deref the null pointer.

Follow-up to 3b40128

Found by Codex Security

When errorf()/warnf() is used early on, before the global pointer is
setup, curl would previosly deref the null pointer.

Follow-up to 3b40128

Found by Codex Security
@bagder
Copy link
Copy Markdown
Member Author

bagder commented Mar 18, 2026

augment review

@bagder bagder marked this pull request as ready for review March 18, 2026 09:27
@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 18, 2026

🤖 Augment PR Summary

Summary: Prevents early calls to warnf()/errorf() from dereferencing an uninitialized global pointer.
Changes: Adds null-guards around accesses to global->tracetype, global->silent, and global->showerror so message output remains safe before global configuration is set up.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant