Fix jpeg_read_icc_profile and jpeg_write_icc_profile symbols

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2018-06-25 10:09:33 +02:00
parent 87cdefb362
commit 52c49bbe92
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,40 @@
diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
index e027e5f..ebfa11d 100644
--- a/Source/FreeImage/PluginJPEG.cpp
+++ b/Source/FreeImage/PluginJPEG.cpp
@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) {
return FALSE. You might want to issue an error message instead.
*/
static BOOL
-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
+plugin_jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
jpeg_saved_marker_ptr marker;
int num_markers = 0;
int seq_no;
@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) {
BYTE *icc_profile = NULL;
unsigned icc_length = 0;
- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
+ if( plugin_jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
// copy ICC profile data
FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
// clean up
@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) {
Write JPEG_APP2 marker (ICC profile)
*/
static BOOL
-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) {
+plugin_jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) {
// marker identifying string "ICC_PROFILE" (null-terminated)
BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 };
@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) {
jpeg_write_comment(cinfo, dib);
// write ICC profile
- jpeg_write_icc_profile(cinfo, dib);
+ plugin_jpeg_write_icc_profile(cinfo, dib);
// write IPTC profile
jpeg_write_iptc_profile(cinfo, dib);

View File

@ -3,7 +3,7 @@
Name: freeimage
Version: 3.17.0
Release: 14%{?dist}
Release: 14.0.riscv64%{?dist}
Summary: Multi-format image decoder library
# freeimage is tripple-licensed, see
@ -20,6 +20,8 @@ Patch1: FreeImage-3.17.0_doxygen.patch
Patch2: FreeImage-3.17.0_CVE-2015-0852.patch
# Fix CVE-2016-5684 (#1381517)
Patch3: FreeImage-3.17.0_CVE-2016-5684.patch
# Fix for libjpeg-turbo 2.0.0 release
Patch4: FreeImage-3170-fix-jpeg-icc-profile-sym.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
@ -72,6 +74,7 @@ developing applications that use %{name}-plus.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# remove all included libs to make sure these don't get used during compile
rm -r Source/Lib* Source/ZLib Source/OpenEXR
@ -151,6 +154,9 @@ ldconfig -n %{buildroot}%{_libdir}
%changelog
* Mon Jun 25 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 3.17.0-14.0.riscv64
- Fix jpeg_read_icc_profile and jpeg_write_icc_profile symbols for libjpeg-turbo 2.0.0
* Sun Feb 18 2018 Sandro Mani <manisandro@gmail.coM> - 3.17.0-14
- Add missing BR: gcc-c++, make