[arch-commits] Commit in fuseiso/repos (6 files)
Felix Yan
felixonmars at archlinux.org
Tue Jul 7 18:14:17 UTC 2020
Date: Tuesday, July 7, 2020 @ 18:14:17
Author: felixonmars
Revision: 660043
archrelease: copy trunk to community-staging-x86_64
Added:
fuseiso/repos/community-staging-x86_64/
fuseiso/repos/community-staging-x86_64/00-support_large_iso.patch
(from rev 660041, fuseiso/trunk/00-support_large_iso.patch)
fuseiso/repos/community-staging-x86_64/01-fix_typo.patch
(from rev 660041, fuseiso/trunk/01-fix_typo.patch)
fuseiso/repos/community-staging-x86_64/02-prevent-buffer-overflow.patch
(from rev 660041, fuseiso/trunk/02-prevent-buffer-overflow.patch)
fuseiso/repos/community-staging-x86_64/03-prevent-integer-overflow.patch
(from rev 660041, fuseiso/trunk/03-prevent-integer-overflow.patch)
fuseiso/repos/community-staging-x86_64/PKGBUILD
(from rev 660041, fuseiso/trunk/PKGBUILD)
-----------------------------------+
00-support_large_iso.patch | 54 ++++++++++++++++++++++++++++++++++++
01-fix_typo.patch | 20 +++++++++++++
02-prevent-buffer-overflow.patch | 35 +++++++++++++++++++++++
03-prevent-integer-overflow.patch | 16 ++++++++++
PKGBUILD | 41 +++++++++++++++++++++++++++
5 files changed, 166 insertions(+)
Copied: fuseiso/repos/community-staging-x86_64/00-support_large_iso.patch (from rev 660041, fuseiso/trunk/00-support_large_iso.patch)
===================================================================
--- community-staging-x86_64/00-support_large_iso.patch (rev 0)
+++ community-staging-x86_64/00-support_large_iso.patch 2020-07-07 18:14:17 UTC (rev 660043)
@@ -0,0 +1,54 @@
+From: Thomas Bittermann
+Subject: handle larger than 4GB isos
+Origin: vendor, http://koji.fedoraproject.org/koji/buildinfo?buildID=149397
+Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=440436
+
+---
+ src/isofs.c | 6 +++---
+ src/isofs.h | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- fuseiso.orig/src/isofs.c
++++ fuseiso/src/isofs.c
+@@ -178,7 +178,7 @@ int isofs_real_preinit( char* imagefile,
+ context.data_size = isonum_723(context.pd.logical_block_size);
+
+ if(!context.block_size) {
+- fprintf(stderr, "init: wrong block data size %d, using default 2048\n", context.data_size);
++ fprintf(stderr, "init: wrong block data size %Lu, using default 2048\n", context.data_size);
+ context.data_size = 2048;
+ };
+
+@@ -324,7 +324,7 @@ void* isofs_real_init() {
+
+ if(context.block_size != 2048) {
+ // report unusual data block size
+- printf("Data block size: %d\n", context.block_size);
++ printf("Data block size: %Lu\n", context.block_size);
+ };
+
+ char buf[129];
+@@ -479,7 +479,7 @@ static int isofs_read_raw_block(int bloc
+ };
+ size_t len = read(context.fd, buf, context.data_size);
+ if(len != context.data_size) {
+- fprintf(stderr, "isofs_read_raw_block: can`t read full block, read only %d bytes from offset %d, %d required; errno %d, message %s\n",
++ fprintf(stderr, "isofs_read_raw_block: can`t read full block, read only %d bytes from offset %d, %Lu required; errno %d, message %s\n",
+ len, (int) off, context.data_size, errno, strerror(errno));
+ fprintf(stderr, "isofs_read_raw_block: huh? reading zeros beyond file end? someone want to save a penny?\n");
+ memset(buf + len, 0, context.data_size - len);
+--- fuseiso.orig/src/isofs.h
++++ fuseiso/src/isofs.h
+@@ -38,9 +38,9 @@ typedef struct _isofs_context {
+ struct iso_directory_record *root;
+ int file_offset; // offset to begin of useful data (for .nrg files)
+ int id_offset; // offset to CD001 inside file
+- size_t block_size; // raw block size
+- size_t block_offset; // offset from block start to data
+- size_t data_size; // data size inside block
++ off_t block_size; // raw block size
++ off_t block_offset; // offset from block start to data
++ off_t data_size; // data size inside block
+ int susp; // parse susp entries
+ int susp_skip; // skip bytes from susp SP entry
+ int joliet_level; // joliet extension level (1, 2 or 3)
Copied: fuseiso/repos/community-staging-x86_64/01-fix_typo.patch (from rev 660041, fuseiso/trunk/01-fix_typo.patch)
===================================================================
--- community-staging-x86_64/01-fix_typo.patch (rev 0)
+++ community-staging-x86_64/01-fix_typo.patch 2020-07-07 18:14:17 UTC (rev 660043)
@@ -0,0 +1,20 @@
+From: Jakub Wilk <jwilk at debian.org>
+Subject: fix typo in sourcecode
+Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598021
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598021
+
+---
+ src/fuseiso.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- fuseiso.orig/src/fuseiso.c
++++ fuseiso/src/fuseiso.c
+@@ -295,7 +295,7 @@ void usage(const char* prog) {
+ " -f -- run in foreground, do not daemonize\n"
+ " -d -- run in foreground and print debug information\n"
+ " -s -- run single-threaded\n"
+- "\nPlease consult with FUSE ducumentation for more information\n",
++ "\nPlease consult with FUSE documentation for more information\n",
+ VERSION,
+ prog);
+ };
Copied: fuseiso/repos/community-staging-x86_64/02-prevent-buffer-overflow.patch (from rev 660041, fuseiso/trunk/02-prevent-buffer-overflow.patch)
===================================================================
--- community-staging-x86_64/02-prevent-buffer-overflow.patch (rev 0)
+++ community-staging-x86_64/02-prevent-buffer-overflow.patch 2020-07-07 18:14:17 UTC (rev 660043)
@@ -0,0 +1,35 @@
+Description: Prevent stack-based buffer overflow on too-long path names
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+--- a/src/isofs.c
++++ b/src/isofs.c
+@@ -1532,13 +1532,23 @@
+ if(path[1] != '\0') { // not root dir
+ strcat(absolute_entry, "/");
+ };
+- strcat(absolute_entry, entry);
+- if(g_hash_table_lookup(lookup_table, absolute_entry)) {
+- // already in lookup cache
++
++ if(strlen(absolute_entry) + strlen(entry) <= PATH_MAX-1) {
++ strcat(absolute_entry, entry);
++ if(g_hash_table_lookup(lookup_table, absolute_entry)) {
++ // already in lookup cache
++ isofs_free_inode(inode);
++ } else {
++ g_hash_table_insert(lookup_table, g_strdup(absolute_entry), inode);
++ };
++ }
++ else {
++ printf("readdir: absolute path name for entry '%s' exceeding PATH_MAX (%d)\n", entry, PATH_MAX);
+ isofs_free_inode(inode);
+- } else {
+- g_hash_table_insert(lookup_table, g_strdup(absolute_entry), inode);
+- };
++ free(buf);
++ free(entry);
++ return -EIO;
++ }
+
+ free(entry);
+
Copied: fuseiso/repos/community-staging-x86_64/03-prevent-integer-overflow.patch (from rev 660041, fuseiso/trunk/03-prevent-integer-overflow.patch)
===================================================================
--- community-staging-x86_64/03-prevent-integer-overflow.patch (rev 0)
+++ community-staging-x86_64/03-prevent-integer-overflow.patch 2020-07-07 18:14:17 UTC (rev 660043)
@@ -0,0 +1,16 @@
+Description: Prevent integer overflow in ZISO code
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+--- a/src/isofs.c
++++ b/src/isofs.c
+@@ -1618,6 +1618,10 @@
+ };
+
+ static int isofs_real_read_zf(isofs_inode *inode, char *out_buf, size_t size, off_t offset) {
++ if( inode->zf_block_shift > 17 ) {
++ fprintf(stderr, "isofs_real_read_zf: can't handle ZF block size of 2^%d\n", inode->zf_block_shift);
++ return -EIO;
++ }
+ int zf_block_size = 1 << inode->zf_block_shift;
+ int zf_start = offset / zf_block_size;
+ int zf_end = (offset + size) / zf_block_size;
Copied: fuseiso/repos/community-staging-x86_64/PKGBUILD (from rev 660041, fuseiso/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-07-07 18:14:17 UTC (rev 660043)
@@ -0,0 +1,41 @@
+# Contributor: Shinlun Hsieh <yngwiexx at yahoo.com.tw>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=fuseiso
+pkgver=20070708
+pkgrel=8
+pkgdesc="FUSE module to mount ISO filesystem images"
+arch=('x86_64')
+url="https://sourceforge.net/projects/fuseiso/"
+license=('GPL')
+depends=('fuse2' 'glib2' 'zlib')
+makedepends=('pkgconfig')
+source=("https://ubiz.ru/dm/${pkgname}-${pkgver}.tar.bz2"
+ 00-support_large_iso.patch
+ 01-fix_typo.patch
+ 02-prevent-buffer-overflow.patch
+ 03-prevent-integer-overflow.patch)
+md5sums=('4bb50412b6d01f337565e28afddca3a5'
+ 'f48d99f3928c6caf62fc1d58c99b31ed'
+ 'd5b5f328f4dc23a7a97b46b09d30e48c'
+ 'fcc34d91eeab5e243c4ac7768b9f3c4c'
+ 'f2bacb988113ac28a71e3f136c61c4bf')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # Patchset from debian
+ patch -Np1 -i "${srcdir}"/00-support_large_iso.patch
+ patch -Np1 -i "${srcdir}"/01-fix_typo.patch
+ patch -Np1 -i "${srcdir}"/02-prevent-buffer-overflow.patch
+ patch -Np1 -i "${srcdir}"/03-prevent-integer-overflow.patch
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+}
More information about the arch-commits
mailing list