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
+7
View File
@@ -58,6 +58,13 @@ Procedure.MsgPack_ErrorCode _MsgPackWriteExtField(*MsgPackData.MsgPackData, Form
DebuggerError("A #Null MsgPackData pointer was passed !")
ProcedureReturn #MsgPack_Error_NullPointerGiven
EndIf
; Checked before the header is written, so nothing is left half-written.
If DataSize > 0 And Not *Data
DebuggerError("A #Null data buffer was passed !")
*MsgPackData\LastError = #MsgPack_Error_NullPointerGiven
ProcedureReturn #MsgPack_Error_NullPointerGiven
EndIf
CompilerEndIf
If SizeFieldByteLength = 0