use memmove instead of memcpy to prevent memory overlap corruption(#760657)
This commit is contained in:
parent
39e0dc7b93
commit
0582647d6b
12
ncompress-4.2.4-memmove.patch
Normal file
12
ncompress-4.2.4-memmove.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -urNp ncompress-4.2.4-orig/compress42.c ncompress-4.2.4/compress42.c
|
||||
--- ncompress-4.2.4-orig/compress42.c 2012-01-03 15:13:58.014222927 +0100
|
||||
+++ ncompress-4.2.4/compress42.c 2012-01-03 15:15:17.117097419 +0100
|
||||
@@ -1441,7 +1441,7 @@ compress(fdin, fdout)
|
||||
boff = -(((OBUFSIZ<<3)-boff)%(n_bits<<3));
|
||||
bytes_out += OBUFSIZ;
|
||||
|
||||
- memcpy(outbuf, outbuf+OBUFSIZ, (outbits>>3)+1);
|
||||
+ memmove(outbuf, outbuf+OBUFSIZ, (outbits>>3)+1);
|
||||
memset(outbuf+(outbits>>3)+1, '\0', OBUFSIZ);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: Fast compression and decompression utilities
|
||||
Name: ncompress
|
||||
Version: 4.2.4
|
||||
Release: 55%{?dist}
|
||||
Release: 56%{?dist}
|
||||
License: Public Domain
|
||||
Group: Applications/File
|
||||
URL: http://ncompress.sourceforge.net/
|
||||
@ -14,6 +14,7 @@ Patch4: ncompress-4.2.4-zerobyteforce.patch
|
||||
Patch5: ncompress-4.2.4-bssUnderflow.patch
|
||||
Patch6: ncompress-4.2.4-endians.patch
|
||||
Patch7: ncompress-4.2.4-uncheckedmalloc.patch
|
||||
Patch8: ncompress-4.2.4-memmove.patch
|
||||
BuildRequires: gcc glibc-devel fileutils
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -37,6 +38,7 @@ which are compatible with the original UNIX compress utility.
|
||||
%patch5 -p1 -b .bssUnderflow
|
||||
%patch6 -p1 -b .endians
|
||||
%patch7 -p1 -b .malloccheck
|
||||
%patch8 -p1 -b .memmove
|
||||
mv Makefile.def Makefile
|
||||
|
||||
%build
|
||||
@ -74,6 +76,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc LZW.INFO README
|
||||
|
||||
%changelog
|
||||
* Tue Jan 03 2012 Ondrej Vasik <ovasik@redhat.com> - 4.2.4-56
|
||||
- use memmove instead of memcpy to prevent memory overlap corruption
|
||||
(#760657)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.4-55
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user