dep-protobuf/python/google
Oblivionsage 94df512b87 fix: check AssureWritable() return value at all call sites (#26390)
Fixes #26389

`AssureWritable()` returns `-1` on failure (OOM in `MutableMessage()`), but 13 call sites were ignoring this return value.

When `AssureWritable()` fails, `self->message` still points to the shared read-only default instance. Subsequent mutations (`MergeFrom`, `CopyFrom`, `Clear`, `SetField`, etc.) then corrupt the shared global default instance, affecting all messages of the same type.

Same bug class as the recent `FixupMessageAfterMerge` fix (ab14c0f8a).

Closes #26390

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/26390 from Oblivionsage:fix/check-assure-writable-return-value adbd20477e
PiperOrigin-RevId: 912044414
2026-05-07 10:59:13 -07:00
..
protobuf fix: check AssureWritable() return value at all call sites (#26390) 2026-05-07 10:59:13 -07:00
__init__.py drop-deprecated-pkg-resources-declare (#22442) 2025-07-11 11:09:55 -07:00