summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python/tracemalloc.c
diff options
context:
space:
mode:
authorbabenko <[email protected]>2026-04-20 19:19:07 +0300
committerbabenko <[email protected]>2026-04-20 22:58:55 +0300
commitc1affcfad650dccbdb804889132e7104b60633a7 (patch)
tree545114b8b08210f671e9070495a797103f4b3086 /contrib/tools/python3/Python/tracemalloc.c
parentadd1c721a4dda89c4532a75ff4fb9d6396fa4ab7 (diff)
Fix IsPathRelativeAndInvolvesNoTraversal treating "." component as directory entry
The check `normalizedPath == "."` compared the entire input path against "." instead of the current path component `part`. This caused any "." component in the middle of a path to increment the depth counter rather than be a no-op, allowing subsequent ".." components to escape the root undetected. For example, "./.." was incorrectly accepted: "." bumped depth to 1, then ".." decremented it back to 0, and the function returned true instead of false. Added a regression test covering this case. commit_hash:6d034e6e0a26f960ccdee3f7a362916369b0f4b9
Diffstat (limited to 'contrib/tools/python3/Python/tracemalloc.c')
0 files changed, 0 insertions, 0 deletions