gh-148252: Fix stack depth calculation in binary reader on 32-bit platforms (#148253)
Compute ``final_depth`` in ``decode_stack_pop_push()`` and ``decode_stack_suffix()`` using ``uint64_t`` before validating it. On 32-bit builds, using ``size_t`` arithmetic for ``keep + push`` can wrap for large input values, causing the later bounds check to validate the wrong final depth. Using a widened type keeps the validation aligned with the actual result.
P
Pablo Galindo Salgado committed
eb4c78df07c87237f97e4c3e6f583fd4155821b3
Parent: 2662db0
Committed by GitHub <noreply@github.com>
on 4/13/2026, 10:43:55 PM