pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/archivers/lhasa



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.

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]);
+                       }
+               }
+       }



Home | Main Index | Thread Index | Old Index