Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer overrun in httpclient.c - _CreateHttpHeader #437

Closed
dantraMSFT opened this issue Nov 11, 2017 · 0 comments
Closed

Buffer overrun in httpclient.c - _CreateHttpHeader #437

dantraMSFT opened this issue Nov 11, 2017 · 0 comments

Comments

@dantraMSFT
Copy link
Contributor

The logic that calculates the buffer size does not take into account the trailing \r\n. In cases where 10 digit value consumes 9 or 10 characters, the buffer is overrun.

The fix is to add an extra call to SizeTAdd; something like the following

SizeTAdd(pageSize, 2, &pageSize) != S_OK

This is blocking the release of the PSRP package and repros consistently in PowerShell 6 when creating a new session to office 365.

See issue PowerShell/PowerShell#5130

yakman2020 pushed a commit that referenced this issue Nov 13, 2017
yakman2020 pushed a commit that referenced this issue Nov 13, 2017
Issues fixed:
  Issue #437: Buffer overrun in httpclient.c - _CreateHttpHeader
  Issue #438: Cannot enable libmi logging on psrp client using tag v1.4.0-6
  Issue #439: httpclient.c:_RequestCallbackWrite does not handle partial sends.
jeffaco pushed a commit that referenced this issue Nov 14, 2017
Issues fixed:

Issue #437: Buffer overrun in httpclient.c - _CreateHttpHeader
Issue #438: Cannot enable libmi logging on psrp client using v1.4.0-6
Issue #439: httpclient.c:_RequestCallbackWrite not handling partial sends.
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

No branches or pull requests

2 participants