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 truncates AMI response #2

Open
InterLinked1 opened this issue Jun 19, 2022 · 0 comments
Open

Insufficient buffer truncates AMI response #2

InterLinked1 opened this issue Jun 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@InterLinked1
Copy link
Owner

Not really surprising, but a static buffer that is too small to fit a single entire AMI response will result in a truncated response being processed.

While this could be fixed easily by simply increasing the buffer to something reasonably large, like from 4096 to 1048576 (which is what I've done in production at the moment), long term we should really be using a dynamic buffer, resizing if necessary, e.g. using realloc, in order to handle any arbitrarily long AMI response. Then we can do away with the fixed buffer altogether, and this should provide maximal resiliency.

@InterLinked1 InterLinked1 added the bug Something isn't working label Jun 19, 2022
InterLinked1 added a commit that referenced this issue Jun 19, 2022
Until issue #2 is resolved, increase the buffer size from 4096
to something reasonably small (1024 * 1024) so that the chance
of AMI responses getting truncated is reduced.
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

1 participant