FreeBSD Bugzilla – Attachment 196875 Details for
Bug 231165
graphics/freeimage: Upgrade to 3.18.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update; fix lld issue on i386
freeimage (text/plain), 16.68 KB, created by
Nathan
on 2018-09-04 21:16:14 UTC
(
hide
)
Description:
Update; fix lld issue on i386
Filename:
MIME Type:
Creator:
Nathan
Created:
2018-09-04 21:16:14 UTC
Size:
16.68 KB
patch
obsolete
>Index: graphics/freeimage/Makefile >=================================================================== >--- graphics/freeimage/Makefile (revision 478972) >+++ graphics/freeimage/Makefile (working copy) >@@ -2,11 +2,7 @@ > # $FreeBSD$ > > PORTNAME= freeimage >-PORTVERSION= 3.16.0 >-PORTREVISION= 6 >-# Version 3.17.0 is available, but does not build on i386 (and probably >-# other 32-bit arches) without some not-quite-trivial patching. If one >-# decides to update the port, please make sure 32-bit builds are tested! >+PORTVERSION= 3.18.0 > CATEGORIES= graphics > MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION} > DISTNAME= FreeImage${PORTVERSION:S/.//g} >@@ -14,6 +10,14 @@ > MAINTAINER= ports@FreeBSD.org > COMMENT= Simple C/C++ bitmap graphics library > >+LICENSE= FIPL GPLv2 GPLv3 >+LICENSE_COMB= multi >+LICENSE_NAME_FIPL= FreeImage Public License >+LICENSE_FILE_FIPL= ${WRKSRC}/license-fi.txt >+LICENSE_FILE_GPLv2= ${WRKSRC}/license-gplv2.txt >+LICENSE_FILE_GPLv3= ${WRKSRC}/license-gplv3.txt >+LICENSE_PERMS_FIPL= dist-mirror pkg-mirror auto-accept >+ > BROKEN_mips= fails to compile: opcode not supported on this processor: mips3 (mips3) `madd $16,$6' > BROKEN_mips64= fails to compile: opcode not supported on this processor: mips3 (mips3) 'madd $4,$5' > >@@ -24,12 +28,8 @@ > USE_LDCONFIG= yes > WRKSRC= ${WRKDIR}/FreeImage > MAKE_ARGS= CC="${CC}" CPP="${CPP}" CXX="${CXX}" >+CFLAGS+= -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC > >-CFLAGS+= -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden >-CFLAGS_aarch64= -fPIC >-CFLAGS_amd64= -fPIC >-CFLAGS_armv7= -fPIC >- > PLIST_FILES= include/FreeImage.h \ > include/FreeImagePlus.h \ > lib/libfreeimage.a \ >@@ -41,12 +41,6 @@ > lib/libfreeimageplus.so.3 \ > lib/libfreeimageplus.so > >-.include <bsd.port.options.mk> >- >-.if ${ARCH} == amd64 || ${ARCH} == powerpc || ${ARCH} == powerpc64 || ${ARCH} == sparc64 >-USES+= compiler:c++0x >-.endif >- > post-patch: > @${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root ||' \ > ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip >Index: graphics/freeimage/distinfo >=================================================================== >--- graphics/freeimage/distinfo (revision 478972) >+++ graphics/freeimage/distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (FreeImage3160.zip) = 03af32dd60140d07515ddfe7b4f467baa3b888a72ea78828811aded7adb42f60 >-SIZE (FreeImage3160.zip) = 5669228 >+TIMESTAMP = 1536092886 >+SHA256 (FreeImage3180.zip) = f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd >+SIZE (FreeImage3180.zip) = 7415716 >Index: graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp >=================================================================== >--- graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp (revision 478972) >+++ graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp (nonexistent) >@@ -1,23 +0,0 @@ >---- Source/FreeImage/PluginXPM.cpp.orig 2013-11-29 19:29:14 UTC >-+++ Source/FreeImage/PluginXPM.cpp >-@@ -181,6 +181,11 @@ Load(FreeImageIO *io, fi_handle handle, >- } >- free(str); >- >-+ // check info string >-+ if((width <= 0) || (height <= 0) || (colors <= 0) || (cpp <= 0)) { >-+ throw "Improperly formed info string"; >-+ } >-+ >- if (colors > 256) { >- dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); >- } else { >-@@ -193,7 +198,7 @@ Load(FreeImageIO *io, fi_handle handle, >- FILE_RGBA rgba; >- >- str = ReadString(io, handle); >-- if(!str) >-+ if(!str || (strlen(str) < (size_t)cpp)) >- throw "Error reading color strings"; >- >- std::string chrs(str,cpp); //create a string for the color chars using the first cpp chars > >Property changes on: graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: graphics/freeimage/files/patch-Source-OpenEXR-IlmImf_ImfAutoArray.h >=================================================================== >--- graphics/freeimage/files/patch-Source-OpenEXR-IlmImf_ImfAutoArray.h (revision 478972) >+++ graphics/freeimage/files/patch-Source-OpenEXR-IlmImf_ImfAutoArray.h (nonexistent) >@@ -1,11 +0,0 @@ >---- Source/OpenEXR/IlmImf/ImfAutoArray.h.orig 2013-01-30 11:10:28.000000000 +0100 >-+++ Source/OpenEXR/IlmImf/ImfAutoArray.h 2013-01-30 12:05:10.000000000 +0100 >-@@ -46,6 +46,8 @@ >- >- #include "OpenEXRConfig.h" >- >-+#include <string.h> >-+ >- namespace Imf { >- >- > >Property changes on: graphics/freeimage/files/patch-Source-OpenEXR-IlmImf_ImfAutoArray.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: graphics/freeimage/files/patch-Source_FreeImage_PluginPSD.cpp >=================================================================== >--- graphics/freeimage/files/patch-Source_FreeImage_PluginPSD.cpp (nonexistent) >+++ graphics/freeimage/files/patch-Source_FreeImage_PluginPSD.cpp (working copy) >@@ -0,0 +1,11 @@ >+--- Source/FreeImage/PluginPSD.cpp.orig 2018-09-04 20:32:27 UTC >++++ Source/FreeImage/PluginPSD.cpp >+@@ -127,7 +127,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int >+ static BOOL DLL_CALLCONV >+ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) { >+ if(!handle) { >+- return NULL; >++ //return NULL; >+ } >+ try { >+ psdParser parser; > >Property changes on: graphics/freeimage/files/patch-Source_FreeImage_PluginPSD.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp >=================================================================== >--- graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp (revision 478972) >+++ graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp (nonexistent) >@@ -1,60 +0,0 @@ >-https://github.com/LibRaw/LibRaw/commit/f4c0b98581a6 >-https://github.com/LibRaw/LibRaw/commit/2cef10389486 >- >---- Source/LibRawLite/internal/dcraw_common.cpp.orig 2014-02-07 19:48:10 UTC >-+++ Source/LibRawLite/internal/dcraw_common.cpp >-@@ -2027,7 +2027,7 @@ void CLASS quicktake_100_load_raw() >- >- void CLASS kodak_radc_load_raw() >- { >-- static const char src[] = { >-+ static const signed char src[] = { >- 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, >- 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, >- 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, >-@@ -3782,22 +3782,22 @@ void CLASS vng_interpolate() >- -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, >- -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, >- -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, >-- -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, >-- -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, >-+ -1,-2,-1,+0,0,-128, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, >-+ -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,-120, -1,-1,+1,-2,0,0x40, >- -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, >- -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, >- -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, >- -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, >- -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, >- -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, >-- +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, >-+ +0,-2,+0,+0,1,-128, +0,-1,+0,+1,1,-120, +0,-1,+1,-2,0,0x40, >- +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, >- +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, >- +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, >- +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, >- +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, >-- +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, >-- +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, >-+ +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,-128, >-+ +1,-1,+1,+1,0,-120, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, >- +1,+0,+2,+1,0,0x10 >- }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; >- ushort (*brow[5])[4], *pix; >-@@ -7380,7 +7380,7 @@ void CLASS adobe_coeff (const char *t_make, const char >- { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, >- { "Phase One P65", 0, 0, >- { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, >-- { "Red One", 704, 0xffff, /* DJC */ >-+ { "Red One", 704, -1, /* DJC */ >- { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, >- { "Samsung EK-GN120", 0, 0, /* Adobe; Galaxy NX */ >- { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } }, >-@@ -9235,7 +9235,7 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) >- strncpy (th->t_desc, desc, 512); >- strncpy (th->t_make, make, 64); >- strncpy (th->t_model, model, 64); >-- strcpy (th->soft, "dcraw v"DCRAW_VERSION); >-+ strcpy (th->soft, "dcraw v" DCRAW_VERSION); >- t = localtime (×tamp); >- sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", >- t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); > >Property changes on: graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: graphics/freeimage/files/patch-integer_overflow >=================================================================== >--- graphics/freeimage/files/patch-integer_overflow (revision 478972) >+++ graphics/freeimage/files/patch-integer_overflow (nonexistent) >@@ -1,129 +0,0 @@ >-CVE-2015-0852 >- >-Description: fix integer overflow >-Origin: upstream >- http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=patch&r1=1.17&r2=1.18&pathrev=MAIN >- http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=patch&r1=1.18&r2=1.19&pathrev=MAIN >-Bug-Debian: https://bugs.debian.org/797165 >-Last-Update: 2015-09-14 >---- >-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ >-Index: freeimage/Source/FreeImage/PluginPCX.cpp >-=================================================================== >---- freeimage.orig/Source/FreeImage/PluginPCX.cpp >-+++ Source/FreeImage/PluginPCX.cpp >-@@ -347,12 +347,14 @@ Load(FreeImageIO *io, fi_handle handle, >- >- try { >- // check PCX identifier >-- >-- long start_pos = io->tell_proc(handle); >-- BOOL validated = pcx_validate(io, handle); >-- io->seek_proc(handle, start_pos, SEEK_SET); >-- if(!validated) { >-- throw FI_MSG_ERROR_MAGIC_NUMBER; >-+ // (note: should have been already validated using FreeImage_GetFileType but check again) >-+ { >-+ long start_pos = io->tell_proc(handle); >-+ BOOL validated = pcx_validate(io, handle); >-+ io->seek_proc(handle, start_pos, SEEK_SET); >-+ if(!validated) { >-+ throw FI_MSG_ERROR_MAGIC_NUMBER; >-+ } >- } >- >- // process the header >-@@ -366,20 +368,38 @@ Load(FreeImageIO *io, fi_handle handle, >- SwapHeader(&header); >- #endif >- >-- // allocate a new DIB >-+ // process the window >-+ const WORD *window = header.window; // left, upper, right,lower pixel coord. >-+ const int left = window[0]; >-+ const int top = window[1]; >-+ const int right = window[2]; >-+ const int bottom = window[3]; >- >-- unsigned width = header.window[2] - header.window[0] + 1; >-- unsigned height = header.window[3] - header.window[1] + 1; >-- unsigned bitcount = header.bpp * header.planes; >-- >-- if (bitcount == 24) { >-- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); >-- } else { >-- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); >-+ // check image size >-+ if((left >= right) || (top >= bottom)) { >-+ throw FI_MSG_ERROR_PARSING; >- } >- >-- // if the dib couldn't be allocated, throw an error >-+ const unsigned width = right - left + 1; >-+ const unsigned height = bottom - top + 1; >-+ const unsigned bitcount = header.bpp * header.planes; >-+ >-+ // allocate a new DIB >-+ switch(bitcount) { >-+ case 1: >-+ case 4: >-+ case 8: >-+ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); >-+ break; >-+ case 24: >-+ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); >-+ break; >-+ default: >-+ throw FI_MSG_ERROR_DIB_MEMORY; >-+ break; >-+ } >- >-+ // if the dib couldn't be allocated, throw an error >- if (!dib) { >- throw FI_MSG_ERROR_DIB_MEMORY; >- } >-@@ -426,19 +446,23 @@ Load(FreeImageIO *io, fi_handle handle, >- >- if (palette_id == 0x0C) { >- BYTE *cmap = (BYTE*)malloc(768 * sizeof(BYTE)); >-- io->read_proc(cmap, 768, 1, handle); >- >-- pal = FreeImage_GetPalette(dib); >-- BYTE *pColormap = &cmap[0]; >-+ if(cmap) { >-+ io->read_proc(cmap, 768, 1, handle); >- >-- for(int i = 0; i < 256; i++) { >-- pal[i].rgbRed = pColormap[0]; >-- pal[i].rgbGreen = pColormap[1]; >-- pal[i].rgbBlue = pColormap[2]; >-- pColormap += 3; >-+ pal = FreeImage_GetPalette(dib); >-+ BYTE *pColormap = &cmap[0]; >-+ >-+ for(int i = 0; i < 256; i++) { >-+ pal[i].rgbRed = pColormap[0]; >-+ pal[i].rgbGreen = pColormap[1]; >-+ pal[i].rgbBlue = pColormap[2]; >-+ pColormap += 3; >-+ } >-+ >-+ free(cmap); >- } >- >-- free(cmap); >- } >- >- // wrong palette ID, perhaps a gray scale is needed ? >-@@ -466,9 +490,9 @@ Load(FreeImageIO *io, fi_handle handle, >- // calculate the line length for the PCX and the DIB >- >- // length of raster line in bytes >-- unsigned linelength = header.bytes_per_line * header.planes; >-+ const unsigned linelength = header.bytes_per_line * header.planes; >- // length of DIB line (rounded to DWORD) in bytes >-- unsigned pitch = FreeImage_GetPitch(dib); >-+ const unsigned pitch = FreeImage_GetPitch(dib); >- >- // run-length encoding ? >- > >Property changes on: graphics/freeimage/files/patch-integer_overflow >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: graphics/freeimage/files/patch-integer_overflow_ljpeg_start >=================================================================== >--- graphics/freeimage/files/patch-integer_overflow_ljpeg_start (revision 478972) >+++ graphics/freeimage/files/patch-integer_overflow_ljpeg_start (nonexistent) >@@ -1,34 +0,0 @@ >-Description: Fix integer overflow in the ljpeg_start function in dcraw >-Author: Alex Tutubalin <lexa@lexa.ru> >-Bug-Debian: https://bugs.debian.org/786790 >-Origin: https://github.com/LibRaw/LibRaw/commit/4606c28f494a750892c5c1ac7903e62dd1c6fdb5 >- https://github.com/rawstudio/rawstudio/commit/983bda1f0fa5fa86884381208274198a620f006e >-Bug: https://security-tracker.debian.org/tracker/CVE-2015-3885 >-Bug: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3885 >-Reviewed-By: Anton Gladky <gladk@debian.org> >-Last-Update: 2015-10-29 >- >---- freeimage-3.15.4.orig/Source/LibRawLite/dcraw/dcraw.c >-+++ Source/LibRawLite/dcraw/dcraw.c >-@@ -768,7 +768,8 @@ struct jhead { >- >- int CLASS ljpeg_start (struct jhead *jh, int info_only) >- { >-- int c, tag, len; >-+ int c, tag; >-+ ushort len; >- uchar data[0x10000]; >- const uchar *dp; >- >---- freeimage-3.15.4.orig/Source/LibRawLite/internal/dcraw_common.cpp >-+++ Source/LibRawLite/internal/dcraw_common.cpp >-@@ -630,7 +630,8 @@ void CLASS canon_compressed_load_raw() >- >- int CLASS ljpeg_start (struct jhead *jh, int info_only) >- { >-- int c, tag, len; >-+ int c, tag; >-+ ushort len; >- uchar data[0x10000]; >- const uchar *dp; >- > >Property changes on: graphics/freeimage/files/patch-integer_overflow_ljpeg_start >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ndowens04
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 231165
:
196875
|
196877
|
196903