[PATCH] gdb/debuginfod: Whitespace-only URL should disable debuginfod
Pedro Alves
pedro@palves.net
Mon May 2 14:33:57 GMT 2022
On 2022-04-29 20:49, Aaron Merey wrote:
> On Fri, Apr 29, 2022 at 10:22 AM Pedro Alves <pedro@palves.net> wrote:
>> Does the rest of the function need to see "urls" with the leading space? It seems like the
>> code further below will also skip leading spaces anyhow. IOW, we can't make this be:
>>
>> urls = skip_spaces (urls);
>>
>> or both lines replaced with:
>>
>> const char *urls = skip_spaces (getenv (DEBUGINFOD_URLS_ENV_VAR));
>>
>> ?
>
> I kept the "urls" with the leading whitespace so that we parse each URL
> consistent with debuginfod's use of ' ' as the sole URL delimiter
> (skip_space also skips tabs, newlines, etc). However debuginfod severs
> should not have URLs containing unescaped whitespace so it's really a
> moot point.
>
> I've fixed this by combining skip_spaces and getenv on one line.
Thanks. LGTM.
More information about the Gdb-patches
mailing list