mirror of
https://github.com/mirror/wget.git
synced 2025-03-04 23:00:22 +08:00
* src/res.c (add_path): Fix memleak (parsing robots.txt)
Fixes OSS-Fuzz issue #8005. This is a long standing bug affecting all versions <= 1.19.4.
This commit is contained in:
parent
fe6d1247ad
commit
76fb1fe6f6
@ -170,6 +170,8 @@ prune_non_exact (struct robot_specs *specs)
|
||||
for (i = 0, j = 0; i < specs->count; i++)
|
||||
if (specs->paths[i].user_agent_exact_p)
|
||||
newpaths[j++] = specs->paths[i];
|
||||
else
|
||||
xfree (specs->paths[i].path);
|
||||
assert (j == cnt);
|
||||
xfree (specs->paths);
|
||||
specs->paths = newpaths;
|
||||
|
Loading…
Reference in New Issue
Block a user