mirror of
https://github.com/mirror/wget.git
synced 2025-02-16 06:40:48 +08:00
* src/url.c (append_uri_pathel): Add cheap extra check to help static analyzers
This commit is contained in:
parent
c778ac20b4
commit
91c42c799a
@ -1518,6 +1518,11 @@ append_uri_pathel (const char *b, const char *e, bool escaped,
|
||||
outlen = (e - b) + (2 * quoted);
|
||||
GROW (dest, outlen);
|
||||
|
||||
// This should not happen, but it's impossible to argue with static analysis that it can't happen
|
||||
// (in theory it can). So give static analyzers a hint.
|
||||
if (!dest->base)
|
||||
return;
|
||||
|
||||
if (!quoted)
|
||||
{
|
||||
/* If there's nothing to quote, we can simply append the string
|
||||
|
Loading…
Reference in New Issue
Block a user