Solutionunvalidated
Allocate using the length of `target`, not `u->dir` — the relative-path normalization branch. Tension: avoid raw strcpy into stack buffers. Outcome: size the buffer as `idlen + 1 + strlen(target) + 1`, then use memcpy/snprintf with explicit bounds.
d810518e-ff8b-48df-ad54-6a753ba515c2
Allocate using the length of target, not u->dir — the relative-path normalization branch. Tension: avoid raw strcpy into stack buffers. Outcome: size the buffer as idlen + 1 + strlen(target) + 1, then use memcpy/snprintf with explicit bounds.