Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 5603C1A921F for ; Mon, 16 Nov 2020 15:48:46 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 96A9284DBD; Mon, 16 Nov 2020 15:48:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D133684CCD for ; Mon, 16 Nov 2020 15:48:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id blgJ9ZKtUmWX for ; Mon, 16 Nov 2020 15:48:44 +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 43FA384C71 for ; Mon, 16 Nov 2020 15:48:44 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 3DB84FA9D; Mon, 16 Nov 2020 15:48:44 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1605541724205230" MIME-Version: 1.0 Date: Mon, 16 Nov 2020 15:48:44 +0000 From: "Izumi Tsutsui" Subject: CVS commit: pkgsrc/archivers/lhasa To: pkgsrc-changes@NetBSD.org Reply-To: tsutsui@netbsd.org X-Mailer: log_accum Message-Id: <20201116154844.3DB84FA9D@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1605541724205230 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: tsutsui Date: Mon Nov 16 15:48:44 UTC 2020 Modified Files: pkgsrc/archivers/lhasa: Makefile distinfo Added Files: pkgsrc/archivers/lhasa/patches: patch-lib_lha__file__header.c Log Message: lhasa: avoid SIGSEGV on decoding 8bit char filenames on NetBSD/amd64. Bump PKGREVISION. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 pkgsrc/archivers/lhasa/Makefile cvs rdiff -u -r1.8 -r1.9 pkgsrc/archivers/lhasa/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/archivers/lhasa/patches/patch-lib_lha__file__header.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1605541724205230 Content-Disposition: inline Content-Length: 3078 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/archivers/lhasa/Makefile diff -u pkgsrc/archivers/lhasa/Makefile:1.9 pkgsrc/archivers/lhasa/Makefile:1.10 --- pkgsrc/archivers/lhasa/Makefile:1.9 Sat Jan 18 23:29:56 2020 +++ pkgsrc/archivers/lhasa/Makefile Mon Nov 16 15:48:43 2020 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.9 2020/01/18 23:29:56 rillig Exp $ +# $NetBSD: Makefile,v 1.10 2020/11/16 15:48:43 tsutsui Exp $ DISTNAME= lhasa-0.3.1 +PKGREVISION= 1 CATEGORIES= archivers MASTER_SITES= https://soulsphere.org/projects/lhasa/ Index: pkgsrc/archivers/lhasa/distinfo diff -u pkgsrc/archivers/lhasa/distinfo:1.8 pkgsrc/archivers/lhasa/distinfo:1.9 --- pkgsrc/archivers/lhasa/distinfo:1.8 Wed Jun 22 10:30:18 2016 +++ pkgsrc/archivers/lhasa/distinfo Mon Nov 16 15:48:43 2020 @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.8 2016/06/22 10:30:18 wiz Exp $ +$NetBSD: distinfo,v 1.9 2020/11/16 15:48:43 tsutsui Exp $ SHA1 (lhasa-0.3.1.tar.gz) = 1a5d827100d1e6445b377029b69b901af3ffa240 RMD160 (lhasa-0.3.1.tar.gz) = 4e4cef0525d99c0b4cbe58529da8edaf6b01608b SHA512 (lhasa-0.3.1.tar.gz) = 6e4797aaa054f2ecd25069b32b809ab0111d0179adfd9c676e0609d69efbcc968ec6dce67fbd8ce6bccc102d09ee69996805a5542882b432731e3c273f132c05 Size (lhasa-0.3.1.tar.gz) = 2933084 bytes +SHA1 (patch-lib_lha__file__header.c) = 5603af72663f9d154dd1bdae7839ece1ea22d54a Added files: Index: pkgsrc/archivers/lhasa/patches/patch-lib_lha__file__header.c diff -u /dev/null pkgsrc/archivers/lhasa/patches/patch-lib_lha__file__header.c:1.1 --- /dev/null Mon Nov 16 15:48:44 2020 +++ pkgsrc/archivers/lhasa/patches/patch-lib_lha__file__header.c Mon Nov 16 15:48:44 2020 @@ -0,0 +1,41 @@ +$NetBSD: patch-lib_lha__file__header.c,v 1.1 2020/11/16 15:48:44 tsutsui Exp $ + +- avoid SIGSEGV on NetBSD/amd64 on decoding 8bit char filenames. + https://github.com/fragglet/lhasa/pull/33 + +--- lib/lha_file_header.c.orig 2016-03-30 02:28:14.000000000 +0000 ++++ lib/lha_file_header.c +@@ -194,7 +194,7 @@ static void fix_msdos_allcaps(LHAFileHea + + if (header->path != NULL) { + for (i = 0; header->path[i] != '\0'; ++i) { +- if (islower((unsigned) header->path[i])) { ++ if (islower((int)(unsigned char) header->path[i])) { + is_allcaps = 0; + break; + } +@@ -203,7 +203,7 @@ static void fix_msdos_allcaps(LHAFileHea + + if (is_allcaps && header->filename != NULL) { + for (i = 0; header->filename[i] != '\0'; ++i) { +- if (islower((unsigned) header->filename[i])) { ++ if (islower((int)(unsigned char) header->filename[i])) { + is_allcaps = 0; + break; + } +@@ -216,13 +216,13 @@ static void fix_msdos_allcaps(LHAFileHea + if (header->path != NULL) { + for (i = 0; header->path[i] != '\0'; ++i) { + header->path[i] +- = tolower((unsigned) header->path[i]); ++ = tolower((int)(unsigned char) header->path[i]); + } + } + if (header->filename != NULL) { + for (i = 0; header->filename[i] != '\0'; ++i) { + header->filename[i] +- = tolower((unsigned) header->filename[i]); ++ = tolower((int)(unsigned char) header->filename[i]); + } + } + } --_----------=_1605541724205230--