* src/ftp-ls.c (ftp_parse_vms_ls): Fix use of uninitialized stack mem (Coverity #609373)

This commit is contained in:
Tim Rühsen 2020-02-20 13:17:31 +01:00
parent 79438d4d87
commit 9b1b9961ef

View File

@ -961,16 +961,16 @@ ftp_parse_vms_ls (FILE *fp)
if (!dir)
{
l = dir = (struct fileinfo *)xmalloc (sizeof (struct fileinfo));
cur.prev = cur.next = NULL;
memcpy (l, &cur, sizeof (cur));
l->prev = l->next = NULL;
}
else
{
cur.prev = l;
cur.next = NULL;
l->next = (struct fileinfo *)xmalloc (sizeof (struct fileinfo));
l = l->next;
memcpy (l, &cur, sizeof (cur));
l->next = NULL;
}
cur.name = NULL;