Skip to content

sws: fix potential OOB write#20988

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:swsoob
Closed

sws: fix potential OOB write#20988
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:swsoob

Conversation

@vszakats
Copy link
Copy Markdown
Member

Found by Codex Security

Follow-up to 0aaebf6

Found by Codex Security

Follow-up to 0aaebf6
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a potential out-of-bounds write in the sws test server by ensuring reads into the request buffer always leave room for a NUL terminator when logging/storing received websocket traffic.

Changes:

  • Adjusted websocket traffic sread() length calculation to reserve 1 byte for '\0'.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@vszakats
Copy link
Copy Markdown
Member Author

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 18, 2026

🤖 Augment PR Summary

Summary: Fixes a potential out-of-bounds write in the sws test server when reading upgraded (websocket) traffic into the request buffer.

Changes:

  • Adjusts the `sread()` length calculation to leave space for a terminating NUL byte before later writing `reqbuf[req->offset] = '\0'`

🤖 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.

@vszakats vszakats closed this in 2bb3643 Mar 19, 2026
@vszakats vszakats deleted the swsoob branch March 19, 2026 11:06
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.

2 participants