Fixed OOB read & write, crash, and inconsistencies

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-10-28 21:44:47 +01:00
parent db967ecdee
commit cb9185d65c
8 changed files with 60 additions and 13 deletions
+9
View File
@@ -51,6 +51,12 @@ CompilerEndIf
; Used to represent any size that couldn't be calculated/derived/...
#MsgPack_InvalidSize = -1
; Biggest value a `.i` can hold, used to reject sizes that would be truncated on x86.
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
#_MsgPack_MaxIntegerValue = $7FFFFFFF
CompilerElse
#_MsgPack_MaxIntegerValue = $7FFFFFFFFFFFFFFF
CompilerEndIf
; ------------------------------------------------------------------------------
@@ -188,6 +194,9 @@ EnumerationBinary _MsgPack_DataFlags
#MsgPack_DataFlags_CanProvideVals = %0000000010000000
EndEnumeration
; Flags set on every new `MsgPackData`, so all reads and writes move the offset.
#_MsgPack_DefaultDataFlags = #MsgPack_DataFlags_MoveOffsetAfterRead | #MsgPack_DataFlags_MoveOffsetAfterWrite
EnumerationBinary _MsgPack_ExaminationOptions
; If set, we don't seek the end of the examined map/array.
#MsgPack_ExaminationOptions_NoEndSeeking = %0000000000000001