New compiler: potential code buffer overflow when compiling certain snippets #2418
Labels
ags 4
related to the ags4 development
context: script compiler
type: bug
unexpected/erroneous behavior in the existing functionality
Milestone
CC @fernewelten
As demonstrated by #2417.
Certain code snippets cause write or read beyond the valid data in
code
buffer.This was never noticed before, because compiler allocates this buffer with an extra capacity, and offset mistakes are quite small (few bytes).
Errors occur in functions
AGS::ForwardJump::Patch
andAGS::BackwardJumpDest::Set
.Specifically, following tests cause the error:
Bytecode1.Ternary5
Compile0.Ternary02
Compile1.CompileTimeConstant2
The text was updated successfully, but these errors were encountered: