]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Clear the link resolver structure on initialization; this fixes
authorTim Kientzle <kientzle@gmail.com>
Sun, 4 May 2008 20:08:45 +0000 (16:08 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 4 May 2008 20:08:45 +0000 (16:08 -0400)
a crash when the link resolver is cleaned up.

SVN-Revision: 21

libarchive/archive_entry_link_resolver.c

index 70c470c3b1ba2d22b62a9fe8097a5f361e4cd502..7a34b272fc121249f47b8b2cb41e3d1cba3d74f0 100644 (file)
@@ -327,6 +327,7 @@ insert_entry(struct archive_entry_linkresolver *res,
        le = malloc(sizeof(struct links_entry));
        if (le == NULL)
                return (NULL);
+       memset(le, 0, sizeof(*le));
        le->canonical = archive_entry_clone(entry);
 
        /* If the links cache is getting too full, enlarge the hash table. */