SIGN IN SIGN UP

[3.14] `_struct.c`: Fix UB from integer overflow in `prepare_s` (GH-145158) (#145162)

`_struct.c`: Fix UB from integer overflow in `prepare_s` (GH-145158)

Avoid possible undefined behaviour from signed overflow in `struct` module

As discovered via oss-fuzz.
(cherry picked from commit fd0400585eb957c7d10812d87a8cb9e1f3c72519)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
M
Miss Islington (bot) committed
35a7a6767e9fbda4d4462afe81a3c3c6dca7ef33
Parent: 1f3ea54
Committed by GitHub <noreply@github.com> on 2/24/2026, 1:18:32 AM