]> Lady’s Gitweb - CGirls/commit
Drop `assert()´ check in subpath parsing current
authorLady <redacted>
Fri, 28 Mar 2025 17:44:56 +0000 (13:44 -0400)
committerLady <redacted>
Fri, 28 Mar 2025 17:44:56 +0000 (13:44 -0400)
commitd65576276453389c6d97085203b90108198ed187
tree614818126c668393d63292419070d6f57ddf7f68
parent1d51bcca18b99d2b82d388ca8832ac85c539fdd6
Drop `assert()´ check in subpath parsing

This is a minor refactor to use `for´ loops instead of `while´ ones
when parsing subpaths, and to condition exiting the second loop on
filling the array, rather than on reaching the end of the string. If
there is a bug in the code which causes the array to be too small, this
will simply clip the result rather than try to assign to out‐of‐bounds
memory. If there is a bug in the code which causes the array to be too
big, the program will loop endlessly rather than fail an `assert()´
check. The improvement in the first case is deemed to justify the
slight degradation of behaviour in the second.
request.c
This page took 0.13238 seconds and 4 git commands to generate.