Backport fix for large inode issue (bz 619020) from 4.1.

This commit is contained in:
Bruno Wolff III 2010-08-14 14:17:42 -05:00
parent d168468b20
commit a3437e1f75
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,20 @@
--- squashfs-tools/mksquashfs.c.orig 2009-04-05 16:22:48.000000000 -0500
+++ squashfs-tools/mksquashfs.c 2010-08-14 14:07:28.000000000 -0500
@@ -938,7 +938,7 @@
(unsigned short *) (inode_table + inode_bytes), 1);
inode_bytes += SQUASHFS_COMPRESSED_SIZE(c_byte) + BLOCK_OFFSET;
total_inode_bytes += SQUASHFS_METADATA_SIZE + BLOCK_OFFSET;
- memcpy(data_cache, data_cache + SQUASHFS_METADATA_SIZE,
+ memmove(data_cache, data_cache + SQUASHFS_METADATA_SIZE,
cache_bytes - SQUASHFS_METADATA_SIZE);
cache_bytes -= SQUASHFS_METADATA_SIZE;
}
@@ -1579,7 +1579,7 @@
directory_bytes += SQUASHFS_COMPRESSED_SIZE(c_byte) +
BLOCK_OFFSET;
total_directory_bytes += SQUASHFS_METADATA_SIZE + BLOCK_OFFSET;
- memcpy(directory_data_cache, directory_data_cache +
+ memmove(directory_data_cache, directory_data_cache +
SQUASHFS_METADATA_SIZE, directory_cache_bytes -
SQUASHFS_METADATA_SIZE);
directory_cache_bytes -= SQUASHFS_METADATA_SIZE;

View File

@ -2,13 +2,14 @@ Summary: Utility for the creation of squashfs filesystems
Name: squashfs-tools Name: squashfs-tools
Version: 4.0 Version: 4.0
# cvs snapshot from cvs -d:pserver:anonymous@squashfs.cvs.sourceforge.net:/cvsroot/squashfs co squashfs on 2009-01-25 # cvs snapshot from cvs -d:pserver:anonymous@squashfs.cvs.sourceforge.net:/cvsroot/squashfs co squashfs on 2009-01-25
Release: 4%{?dist} Release: 5%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
URL: http://squashfs.sf.net URL: http://squashfs.sf.net
Source0: http://cdnetworks-us-2.dl.sourceforge.net/project/squashfs/squashfs/squashfs%{version}/squashfs%{version}.tar.gz Source0: http://cdnetworks-us-2.dl.sourceforge.net/project/squashfs/squashfs/squashfs%{version}/squashfs%{version}.tar.gz
Patch0: squashfs-cflags.patch Patch0: squashfs-cflags.patch
Patch1: squashfs-fix-unsquashing-v3.patch Patch1: squashfs-fix-unsquashing-v3.patch
Patch2: squashfs-large-inode.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -20,6 +21,7 @@ contains the utilities for manipulating squashfs filesystems.
%setup -q -n squashfs%{version} %setup -q -n squashfs%{version}
%patch0 -p1 -b .cflags %patch0 -p1 -b .cflags
%patch1 -p1 -b .fix-unsquashing-v3 %patch1 -p1 -b .fix-unsquashing-v3
%patch2
%build %build
pushd squashfs-tools pushd squashfs-tools
@ -42,6 +44,9 @@ rm -rf $RPM_BUILD_ROOT
%{_sbindir}/unsquashfs %{_sbindir}/unsquashfs
%changelog %changelog
* Sat Aug 14 2010 Bruno Wolff III <bruno@wolff.to> 4.0-5
- Backport fix for 619020 (large inode issue) from 4.1
* Wed May 5 2010 Kyle McMartin <kyle@redhat.com> 4.0-4 * Wed May 5 2010 Kyle McMartin <kyle@redhat.com> 4.0-4
- squashfs-fix-unsquashing-v3.patch: pull in fix from cvs. Thanks pkl! - squashfs-fix-unsquashing-v3.patch: pull in fix from cvs. Thanks pkl!
(rhbz#523504) (rhbz#523504)