Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id DEDB484F18 for ; Sat, 10 Jun 2023 12:46:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id Jm714GXX9ba2 for ; Sat, 10 Jun 2023 12:46:32 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 75BA784CC9 for ; Sat, 10 Jun 2023 12:46:32 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 6EBF9FA89; Sat, 10 Jun 2023 12:46:32 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 10 Jun 2023 12:46:32 +0000 From: "Luke Mewburn" Subject: CVS commit: src/external/bsd/libarchive/dist/libarchive To: source-changes@NetBSD.org Approved: for-source-only Reply-To: lukem@netbsd.org X-Mailer: log_accum Message-Id: <20230610124632.6EBF9FA89@cvs.NetBSD.org> Module Name: src Committed By: lukem Date: Sat Jun 10 12:46:32 UTC 2023 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_disk_posix.c Log Message: libarchive: fail if name_max is 0 Add error handling to the USE_READDIR_R code paths that set name_max from struct statfs or statvfs; if the determined name_max == 0 then return an error. Avoids a crash in tree_dir_next_posix() when the calculation of dirent_size from name_max is too small for the memory allocated for struct dirent. Submitted to upstream in pull request https://github.com/libarchive/libarchive/pull/1903 Should fix PR bin/56080 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.