From: Tim Kientzle Date: Sat, 1 Nov 2025 05:07:19 +0000 (-0700) Subject: Merge pull request #2768 from Commandoss/master X-Git-Tag: v3.8.3~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82b57a9740aa6d084edcf4592a3b8e49f63dec98;p=thirdparty%2Flibarchive.git Merge pull request #2768 from Commandoss/master Fix for an out-of-bounds buffer overrun when using p[H_LEVEL_OFFSET] (cherry picked from commit ce614c65246158bcb0dc1f9c1dce5a5af65f9827) --- diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c index 2a84ad9dd..abf8b8799 100644 --- a/libarchive/archive_read_support_format_lha.c +++ b/libarchive/archive_read_support_format_lha.c @@ -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);