Skip to content

Conversation

@mtb0x1
Copy link
Contributor

@mtb0x1 mtb0x1 commented Jun 18, 2024

The stack buffer overflow is occurring because memcpy(buf, op.data(), op.size()); can write up to op.size() bytes into buf, but buf is only 33 bytes long. If op.size() is greater than 33, this will result in a buffer overflow.

@kripken kripken requested a review from tlively June 18, 2024 17:07
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

Thanks!

@tlively
Copy link
Member

tlively commented Jun 18, 2024

Can you try emitting // NOLINTBEGIN and // NOLINTEND comments around the generated code to solve the clang-tidy error on CI?

@mtb0x1
Copy link
Contributor Author

mtb0x1 commented Jun 18, 2024

@tlively I added your suggestion but the lint runner is still failing, and it's failing on first line of gen-s-parser.inc ... for some reason.

@tlively
Copy link
Member

tlively commented Jun 18, 2024

Ok, thanks for trying that. I'll just commit despite the lint failure, then.

@tlively tlively merged commit 408bc7f into WebAssembly:main Jun 18, 2024
@gkdn gkdn mentioned this pull request Aug 31, 2024
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

Successfully merging this pull request may close these issues.

3 participants