summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python/optimizer.c
diff options
context:
space:
mode:
authorbabenko <[email protected]>2026-05-04 15:47:30 +0300
committerbabenko <[email protected]>2026-05-04 16:29:08 +0300
commit35e0922fc38ae37d5ff5a0006c2ca86f9a76a391 (patch)
tree05b713d6d5f2aa2718dd957fc5bdbb675d7dc5f2 /contrib/tools/python3/Python/optimizer.c
parent2dcb8762e41cdedcfe1f4d23f81377270647c182 (diff)
YT-28136: Fix UB in PositionTable_ initializers (issues 14, 15)
Both TNamedToPositionalStructConverter and TPositionalStructCursorConverter had lambdas in member initializer lists that wrote to PositionTable_ instead of the local result vector. Since PositionTable_ is the very member being initialized by the lambda's return value, its storage is uninitialized at the time the lambda runs — writing to it is undefined behavior. The returned result was always empty, so PositionTable_ ended up empty and subsequent index lookups read out of bounds. Fix: use result.push_back / result[i] inside the lambdas. commit_hash:fbe6f5919b33fabb3fb7298f54d8d53a7354547d
Diffstat (limited to 'contrib/tools/python3/Python/optimizer.c')
0 files changed, 0 insertions, 0 deletions