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

Insufficient buffer size causes truncation, malformed request #139

Open
InterLinked1 opened this issue Feb 7, 2023 · 0 comments
Open

Insufficient buffer size causes truncation, malformed request #139

InterLinked1 opened this issue Feb 7, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@InterLinked1
Copy link
Contributor

There are some static buffer sizes in discord-gateway_dispatch.c that can be too small for large requests, causing truncation of the JSON payload and causing the Discord API to disconnect us, aborting any requests in progress. For example, this limit can be hit when requesting guild members with a payload of between 40 and 45 users, with a buffer size of 1024.

This commit partially addresses this with a stopgap fix: b860d9f

Seems like dynamic allocation should be used instead?

@InterLinked1 InterLinked1 added the bug Something isn't working label Feb 7, 2023
@lcsmuller lcsmuller self-assigned this Feb 7, 2023
@lcsmuller lcsmuller mentioned this issue May 14, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants