Accepting request 1144005 from graphics
OBS-URL: https://build.opensuse.org/request/show/1144005 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netpbm?expand=0&rev=81
This commit is contained in:
commit
c463f21fac
77
netpbm-use-byrow-when-needed.patch
Normal file
77
netpbm-use-byrow-when-needed.patch
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
Index: netpbm-11.5.2/converter/other/tifftopnm.c
|
||||||
|
===================================================================
|
||||||
|
--- netpbm-11.5.2.orig/converter/other/tifftopnm.c
|
||||||
|
+++ netpbm-11.5.2/converter/other/tifftopnm.c
|
||||||
|
@@ -1393,7 +1393,7 @@ convertRasterByRows(pnmOut * const
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-static void
|
||||||
|
+static int
|
||||||
|
warnBrokenTiffLibrary(TIFF * const tiffP) {
|
||||||
|
|
||||||
|
/* TIFF library bug:
|
||||||
|
@@ -1423,6 +1423,7 @@ warnBrokenTiffLibrary(TIFF * const tiffP
|
||||||
|
|
||||||
|
unsigned short tiffOrientation;
|
||||||
|
int fldPresent;
|
||||||
|
+ int broken = false;
|
||||||
|
fldPresent = TIFFGetField(tiffP, TIFFTAG_ORIENTATION, &tiffOrientation);
|
||||||
|
if (fldPresent) {
|
||||||
|
switch (tiffOrientation) {
|
||||||
|
@@ -1432,10 +1433,12 @@ warnBrokenTiffLibrary(TIFF * const tiffP
|
||||||
|
case ORIENTATION_LEFTBOT:
|
||||||
|
pm_message("WARNING: This TIFF image has an orientation that "
|
||||||
|
"most TIFF libraries convert incorrectly. "
|
||||||
|
- "Use -byrow to circumvent.");
|
||||||
|
+ "Using -byrow to circumvent.");
|
||||||
|
+ broken = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ return broken;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1562,8 +1565,6 @@ convertRasterInMemory(pnmOut *
|
||||||
|
if (verbose)
|
||||||
|
pm_message("Converting in memory ...");
|
||||||
|
|
||||||
|
- warnBrokenTiffLibrary(tif);
|
||||||
|
-
|
||||||
|
ok = TIFFRGBAImageOK(tif, emsg);
|
||||||
|
if (!ok) {
|
||||||
|
pm_message("%s", emsg);
|
||||||
|
@@ -1662,7 +1663,7 @@ convertImage(TIFF * const ti
|
||||||
|
xelval maxval;
|
||||||
|
xel colormap[MAXCOLORS];
|
||||||
|
unsigned short fillorder;
|
||||||
|
- bool flipOk, noflipOk;
|
||||||
|
+ bool flipOk, noflipOk, byrow;
|
||||||
|
pnmOut pnmOut;
|
||||||
|
|
||||||
|
readDirectory(tifP, cmdline.headerdump, &tiffDir);
|
||||||
|
@@ -1674,15 +1675,21 @@ convertImage(TIFF * const ti
|
||||||
|
|
||||||
|
pm_message("writing %s file", pnm_formattypenm(format));
|
||||||
|
|
||||||
|
+ byrow = cmdline.byrow;
|
||||||
|
+ if (warnBrokenTiffLibrary(tifP)) {
|
||||||
|
+ /* force byrow true: http://bugzilla.maptools.org/show_bug.cgi?id=2654#c9 */
|
||||||
|
+ byrow = true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
pnmOut_init(imageoutFileP, alphaFileP, tiffDir.width, tiffDir.height,
|
||||||
|
tiffDir.orientation, maxval, format, maxval,
|
||||||
|
- cmdline.byrow, cmdline.orientraw,
|
||||||
|
+ byrow, cmdline.orientraw,
|
||||||
|
cmdline.verbose,
|
||||||
|
&flipOk, &noflipOk,
|
||||||
|
&pnmOut);
|
||||||
|
|
||||||
|
convertRaster(&pnmOut, tifP, tiffDir, maxval,
|
||||||
|
- fillorder, colormap, cmdline.byrow, flipOk, noflipOk,
|
||||||
|
+ fillorder, colormap, byrow, flipOk, noflipOk,
|
||||||
|
cmdline.verbose);
|
||||||
|
|
||||||
|
pnmOut_term(&pnmOut, cmdline.verbose);
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 2 14:11:02 UTC 2024 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- added patches
|
||||||
|
fix CVE-2017-5849 [bsc#1022790], CVE-2017-5849 [bsc#1022791]
|
||||||
|
+ netpbm-use-byrow-when-needed.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 31 14:59:08 UTC 2024 - pgajdos@suse.com
|
Wed Jan 31 14:59:08 UTC 2024 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ Patch4: %{name}-gcc-warnings.patch
|
|||||||
Patch5: makeman-py3.patch
|
Patch5: makeman-py3.patch
|
||||||
# bsc#1144255 disable jpeg2k support due to removal of jasper
|
# bsc#1144255 disable jpeg2k support due to removal of jasper
|
||||||
Patch8: netpbm-disable-jasper.patch
|
Patch8: netpbm-disable-jasper.patch
|
||||||
|
# CVE-2017-5849 [bsc#1022790], CVE-2017-5849 [bsc#1022791]
|
||||||
|
Patch9: netpbm-use-byrow-when-needed.patch
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
|
Loading…
Reference in New Issue
Block a user