Files
HellionChat/ChatTwo
JonKazama-Hellion 48b3d5c6b1 fix(security): validate UTF8 byte buffer length before pointer arithmetic
CodeQL re-opened the unvalidated-pointer-arithmetic alert at the new
textEnd line because Encoding.GetBytes is a virtual method on
Encoding and the returned array's Length is therefore tracked as
untrusted input for pointer arithmetic.

Compute the expected byte count from the same encoder via
GetByteCount and bail out if the actual buffer length does not match.
That is a real consistency check that would catch a maliciously
swapped Encoding.UTF8 instance, not a dead defensive guard. The
empty-split early-out from the previous fix is folded into the same
condition.
2026-05-02 23:42:59 +02:00
..
2026-05-01 11:59:25 +02:00
2026-04-30 02:59:58 +02:00
2026-04-30 02:59:58 +02:00
2024-11-21 11:58:22 +01:00
2026-04-30 02:59:58 +02:00
2026-04-30 02:59:58 +02:00