rpms/hplip/F-8 hplip-alloc.patch,NONE,1.1 hplip.spec,1.165,1.166
Tim Waugh (twaugh)
fedora-extras-commits at redhat.com
Fri Jan 25 12:35:54 UTC 2008
Author: twaugh
Update of /cvs/pkgs/rpms/hplip/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19349
Modified Files:
hplip.spec
Added Files:
hplip-alloc.patch
Log Message:
* Fri Jan 25 2008 Tim Waugh <twaugh at redhat.com> 2.7.12-3
- The hpijs compression module doesn't allocate enough memory (bug #428536).
hplip-alloc.patch:
--- NEW FILE hplip-alloc.patch ---
diff -up hplip-2.7.12/prnt/hpijs/compression.cpp.alloc hplip-2.7.12/prnt/hpijs/compression.cpp
--- hplip-2.7.12/prnt/hpijs/compression.cpp.alloc 2008-01-25 12:16:45.000000000 +0000
+++ hplip-2.7.12/prnt/hpijs/compression.cpp 2008-01-25 12:18:02.000000000 +0000
@@ -104,12 +104,12 @@ Mode9::Mode9 (SystemServices* pSys,unsig
if (constructor_error != NO_ERROR) // if error in base constructor
return;
- // In the worst case, compression expands data by 50%
- compressBuf = (BYTE*)pSS->AllocMem(RasterSize + RasterSize/2);
+ // In the worst case, compression expands data by 100%
+ compressBuf = (BYTE*)pSS->AllocMem(2 * RasterSize);
if (compressBuf == NULL)
constructor_error=ALLOCMEM_ERROR;
- memset(compressBuf, 0, RasterSize + RasterSize/2);
+ memset(compressBuf, 0, 2 * RasterSize);
memset(SeedRow,0,RasterSize);
ResetSeedRow = FALSE;
@@ -199,7 +199,7 @@ BOOL Mode9::Process(RASTERDATA* input)
return TRUE;
}
- memset(compressBuf, 0, inputsize + inputsize/2);
+ memset(compressBuf, 0, 2 * inputsize);
unsigned int originalsize=input->rastersize[myplane];
unsigned int size=input->rastersize[myplane];
@@ -571,7 +571,7 @@ Mode3::Mode3 (SystemServices* pSys, Prin
// Worst case is when two rows are completely different
// In that case, one command byte is added for every 8 bytes
// In the worst case, compression expands data by 50%
- compressBuf = (BYTE*)pSS->AllocMem(RasterSize + RasterSize/2);
+ compressBuf = (BYTE*)pSS->AllocMem(2 * RasterSize);
if (compressBuf == NULL)
constructor_error=ALLOCMEM_ERROR;
Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-8/hplip.spec,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- hplip.spec 18 Jan 2008 15:52:52 -0000 1.165
+++ hplip.spec 25 Jan 2008 12:35:12 -0000 1.166
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 2.7.12
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -19,6 +19,7 @@
Patch3: hplip-quiet.patch
Patch4: hplip-marker-supply.patch
Patch5: hplip-libm.patch
+Patch6: hplip-alloc.patch
Patch8: hplip-libsane.patch
Patch9: hplip-media-empty.patch
Patch11: hplip-unload-traceback.patch
@@ -108,6 +109,9 @@
# libhpip should link against libm (bug #197599).
%patch5 -p1 -b .libm
+# The hpijs compression module doesn't allocate enough memory (bug #428536).
+%patch6 -p1 -b .alloc
+
# Link libsane-hpaio against libsane (bug #234813).
%patch8 -p1 -b .libsane
@@ -280,6 +284,9 @@
exit 0
%changelog
+* Fri Jan 25 2008 Tim Waugh <twaugh at redhat.com> 2.7.12-3
+- The hpijs compression module doesn't allocate enough memory (bug #428536).
+
* Fri Jan 18 2008 Tim Waugh <twaugh at redhat.com> 2.7.12-2
- Ship installer directory (bug #428246).
- Avoid multilib conflict (bug #341531).
More information about the fedora-extras-commits
mailing list