Commit 4cd420d
committed
fix(masters): harden the two parallel sldLayoutId allocators (Cato audit)
Cato cross-vendor audit flagged defect-instance vs defect-class scoping:
the id-pool fix landed only in CT_SlideLayoutIdList._next_id (the
reproduced path). The two parallel allocators used by the cross-package
append_from / SF7 path were correct only incidentally:
- _add_sldLayoutId_to_master: max(used+[2147483647])+1 — right floor by
luck, no uint32 ceiling, no exhaustion handling.
- _renumber_sldLayoutIds: right floor, no ceiling guard in its loop.
Both now: floor at _OOXML_LAYOUT_ID_FLOOR (explicit, not magic 2147483647),
new shared _UINT32_MAX ceiling, scan-fallback on exhaustion — matching
CT_SlideLayoutIdList._next_id. Closes the defect class, not just the
instance the failing screenshot exposed.
Trinity still green: pytest 3708, ruff clean, behave 0 failed;
append_from/port/layout paths (304 tests) green.
Refs #191 parent c68c890 commit 4cd420d
1 file changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
906 | 914 | | |
907 | 915 | | |
908 | 916 | | |
| |||
964 | 972 | | |
965 | 973 | | |
966 | 974 | | |
967 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
968 | 987 | | |
969 | 988 | | |
970 | 989 | | |
| |||
0 commit comments