]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
heap-use-after-free(read) at src/libarchive/archive_read_support_format_lha.c:692:6 2768/head
authorИлья <54144096+Commandoss@users.noreply.github.com>
Fri, 31 Oct 2025 12:23:55 +0000 (15:23 +0300)
committerGitHub <noreply@github.com>
Fri, 31 Oct 2025 12:23:55 +0000 (15:23 +0300)
libarchive/archive_read_support_format_lha.c

index 2a84ad9dd307251a9174527d551d35b9c3b2fcc5..abf8b8799636258655c6716b24d6fafbe743d38a 100644 (file)
@@ -689,7 +689,7 @@ archive_read_format_lha_read_header(struct archive_read *a,
         * a pathname and a symlink has '\' character, a directory
         * separator in DOS/Windows. So we should convert it to '/'.
         */
-       if (p[H_LEVEL_OFFSET] == 0)
+       if (lha->level == 0)
                lha_replace_path_separator(lha, entry);
 
        archive_entry_set_mode(entry, lha->mode);