pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/lhasa lhasa: avoid SIGSEGV on decoding 8bit ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5c096ccf3100
branches: trunk
changeset: 442010:5c096ccf3100
user: tsutsui <tsutsui%pkgsrc.org@localhost>
date: Mon Nov 16 15:48:43 2020 +0000
description:
lhasa: avoid SIGSEGV on decoding 8bit char filenames on NetBSD/amd64.
Bump PKGREVISION.
diffstat:
archivers/lhasa/Makefile | 3 +-
archivers/lhasa/distinfo | 3 +-
archivers/lhasa/patches/patch-lib_lha__file__header.c | 41 +++++++++++++++++++
3 files changed, 45 insertions(+), 2 deletions(-)
diffs (69 lines):
diff -r be4be864286e -r 5c096ccf3100 archivers/lhasa/Makefile
--- a/archivers/lhasa/Makefile Mon Nov 16 13:27:06 2020 +0000
+++ b/archivers/lhasa/Makefile Mon Nov 16 15:48:43 2020 +0000
@@ -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/
diff -r be4be864286e -r 5c096ccf3100 archivers/lhasa/distinfo
--- a/archivers/lhasa/distinfo Mon Nov 16 13:27:06 2020 +0000
+++ b/archivers/lhasa/distinfo Mon Nov 16 15:48:43 2020 +0000
@@ -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
diff -r be4be864286e -r 5c096ccf3100 archivers/lhasa/patches/patch-lib_lha__file__header.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/lhasa/patches/patch-lib_lha__file__header.c Mon Nov 16 15:48:43 2020 +0000
@@ -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]);
+ }
+ }
+ }
Home |
Main Index |
Thread Index |
Old Index