Re: [PATCH v5 6/9] of/overlay: don't create "//" paths for fragments targeting the root

From: Abdurrahman Hussain

Date: Thu Jul 23 2026 - 13:15:24 EST


On Tue Jul 22, 2026 at 8:35 PM PDT, sashiko-bot wrote:
> [Severity: Medium]
> When path_tail_len is 0 (i.e. a symbol referencing the root of a
> root-targeted overlay fragment), wouldn't unconditionally clearing
> target_path_len result in an invalid empty string "" instead of a valid
> path?
>
> If path_tail is empty, should we preserve the root "/" target?

Right, a symbol for the __overlay__ node itself of a root-targeted
fragment would come out empty instead of "/". The next revision keeps
the target path when the tail is empty:

if (target_path_len == 1 && target_path[0] == '/' && path_tail_len)
target_path_len = 0;

The other two findings are pre-existing and tracked in the cover
letter's open items.

Thanks,
Abdurrahman