public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/freeimage] epel10: Fix empty CVE-2021-33367.patch
Date: Tue, 17 Nov 2026 23:57:19 GMT	[thread overview]
Message-ID: <179495983922.1.17468709311741535840.rpms-freeimage-2063a9b78632@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/freeimage
Branch : epel10
Commit : 2063a9b786324907072ed3ad9da32cb8212353dc
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2023-04-14T00:17:26+02:00
Stats  : +23/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/freeimage/c/2063a9b786324907072ed3ad9da32cb8212353dc?branch=epel10

Log:
Fix empty CVE-2021-33367.patch

---
diff --git a/CVE-2021-33367.patch b/CVE-2021-33367.patch
index e69de29..de6201b 100644
--- a/CVE-2021-33367.patch
+++ b/CVE-2021-33367.patch
@@ -0,0 +1,19 @@
+diff -rupN --no-dereference freeimage-svn-r1889-FreeImage-trunk/Source/Metadata/Exif.cpp freeimage-svn-r1889-FreeImage-trunk-new/Source/Metadata/Exif.cpp
+--- freeimage-svn-r1889-FreeImage-trunk/Source/Metadata/Exif.cpp	2023-04-14 00:15:23.792109187 +0200
++++ freeimage-svn-r1889-FreeImage-trunk-new/Source/Metadata/Exif.cpp	2023-04-14 00:15:26.200065075 +0200
+@@ -770,8 +770,13 @@ jpeg_read_exif_dir(FIBITMAP *dib, const
+ 	//
+ 
+ 	const WORD entriesCount0th = ReadUint16(msb_order, ifd0th);
+-	
+-	DWORD next_offset = ReadUint32(msb_order, DIR_ENTRY_ADDR(ifd0th, entriesCount0th));
++
++	const BYTE* de_addr = DIR_ENTRY_ADDR(ifd0th, entriesCount0th);
++	if(de_addr+4 >= (BYTE*)(dwLength + ifd0th - tiffp)) {
++		return TRUE; //< no thumbnail
++	}
++
++	DWORD next_offset = ReadUint32(msb_order, de_addr);
+ 	if((next_offset == 0) || (next_offset >= dwLength)) {
+ 		return TRUE; //< no thumbnail
+ 	}

diff --git a/freeimage.spec b/freeimage.spec
index 36459b0..0dc72ae 100644
--- a/freeimage.spec
+++ b/freeimage.spec
@@ -6,7 +6,7 @@
 
 Name:           freeimage
 Version:        3.19.0
-Release:        0.15%{?svn_rev:.svn%svn_rev}%{?dist}
+Release:        0.16%{?svn_rev:.svn%svn_rev}%{?dist}
 Summary:        Multi-format image decoder library
 
 # freeimage is tripple-licensed, see
@@ -163,6 +163,9 @@ ldconfig -n %{buildroot}%{_libdir}
 
 
 %changelog
+* Thu Apr 13 2023 Sandro Mani <manisandro@gmail.com> - 3.19.0-0.16.svn1889
+- Fix empty CVE-2021-33367.patch
+
 * Thu Apr 13 2023 Sandro Mani <manisandro@gmail.com> - 3.19.0-0.15.svn1889
 - Add proposed fix for CVE-2021-33367
 

                 reply	other threads:[~2026-11-17 23:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179495983922.1.17468709311741535840.rpms-freeimage-2063a9b78632@fedoraproject.org \
    --to=manisandro@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox