mirror of
https://github.com/mirror/wget.git
synced 2025-01-04 09:20:48 +08:00
* src/ftp-ls.c (ftp_parse_vms_ls): Fix use of uninitialized stack mem (Coverity #609373)
This commit is contained in:
parent
79438d4d87
commit
9b1b9961ef
@ -961,16 +961,16 @@ ftp_parse_vms_ls (FILE *fp)
|
|||||||
if (!dir)
|
if (!dir)
|
||||||
{
|
{
|
||||||
l = dir = (struct fileinfo *)xmalloc (sizeof (struct fileinfo));
|
l = dir = (struct fileinfo *)xmalloc (sizeof (struct fileinfo));
|
||||||
|
cur.prev = cur.next = NULL;
|
||||||
memcpy (l, &cur, sizeof (cur));
|
memcpy (l, &cur, sizeof (cur));
|
||||||
l->prev = l->next = NULL;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cur.prev = l;
|
cur.prev = l;
|
||||||
|
cur.next = NULL;
|
||||||
l->next = (struct fileinfo *)xmalloc (sizeof (struct fileinfo));
|
l->next = (struct fileinfo *)xmalloc (sizeof (struct fileinfo));
|
||||||
l = l->next;
|
l = l->next;
|
||||||
memcpy (l, &cur, sizeof (cur));
|
memcpy (l, &cur, sizeof (cur));
|
||||||
l->next = NULL;
|
|
||||||
}
|
}
|
||||||
cur.name = NULL;
|
cur.name = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user