diff --git a/hplip-hpcups-crash.patch b/hplip-hpcups-crash.patch new file mode 100644 index 0000000..28f34f7 --- /dev/null +++ b/hplip-hpcups-crash.patch @@ -0,0 +1,13 @@ +diff --git a/prnt/hpcups/Compressor.cpp b/prnt/hpcups/Compressor.cpp +index 7fbbcd0..a29955e 100644 +--- a/prnt/hpcups/Compressor.cpp ++++ b/prnt/hpcups/Compressor.cpp +@@ -29,7 +29,7 @@ + \*****************************************************************************/ + #include "Compressor.h" + +-Compressor::Compressor (unsigned int RasterSize, bool useseed) : SeedRow(NULL), UseSeedRow(useseed), inputsize(RasterSize), seeded(false) ++Compressor::Compressor (unsigned int RasterSize, bool useseed) : SeedRow(NULL), compressBuf(NULL), UseSeedRow(useseed), inputsize(RasterSize), seeded(false) + { + constructor_error = NO_ERROR; + iRastersReady = 0; diff --git a/hplip.spec b/hplip.spec index 86f124d..a7b70c5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.18.12 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC Url: https://developers.hp.com/hp-linux-imaging-and-printing @@ -106,6 +106,11 @@ Patch45: hplip-hpmud-string-parse.patch # It was found out that specific device needs plugin for scanning # Reported upstream as https://bugs.launchpad.net/hplip/+bug/1822762 Patch46: hplip-m278-m281-needs-plugin.patch +# hpcups crashes when a printer needs a plugin and does not have one installed +# it crashes in destructor, because pointer is not initialized +# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1695716 +# reported upstream +Patch47: hplip-hpcups-crash.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -356,6 +361,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h %patch45 -p1 -b .hpmud-string-parse # 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O (part 2) %patch46 -p1 -b .m278-m281-needs-plugin +# 1695716 - hpcups crashes in Compressor destructor +%patch47 -p1 -b .hpcups-crash sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ @@ -642,6 +649,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio %changelog +* Thu Apr 04 2019 Zdenek Dohnal - 3.18.12-9 +- 1695716 - hpcups crashes in Compressor destructor + * Mon Apr 01 2019 Zdenek Dohnal - 3.18.12-8 - 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O