rpms/foremost/devel foremost-broken-jpeg.patch, NONE, 1.1 foremost.spec, 1.8, 1.9

Toshio くらとみ (toshio) fedora-extras-commits at redhat.com
Mon Mar 24 17:30:57 UTC 2008


Author: toshio

Update of /cvs/pkgs/rpms/foremost/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26195

Modified Files:
	foremost.spec 
Added Files:
	foremost-broken-jpeg.patch 
Log Message:

* Mon Mar 24 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 1.5.3-2
- Patch to fix segfaults with broken jpeg headers from bz#438631.


foremost-broken-jpeg.patch:

--- NEW FILE foremost-broken-jpeg.patch ---
--- foremost-1.5.3.old/extract.c	2007-12-05 00:53:52.000000000 +0100
+++ foremost-1.5.3/extract.c	2008-03-23 15:26:57.000000000 +0100
@@ -1765,6 +1765,11 @@ unsigned char *extract_jpeg(f_state *s, 
 
 		foundat += headersize;
 
+		if (foundat >= (buf + buflen))
+			{
+			return buf + needle->header_len;
+			}
+
 		if (foundat[2] != (unsigned char)'\xff')
 			{
 			break;


Index: foremost.spec
===================================================================
RCS file: /cvs/pkgs/rpms/foremost/devel/foremost.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- foremost.spec	8 Feb 2008 21:51:44 -0000	1.8
+++ foremost.spec	24 Mar 2008 17:30:06 -0000	1.9
@@ -7,6 +7,7 @@
 License:        Public Domain
 URL:            http://foremost.sf.net
 Source0:        http://foremost.sourceforge.net/pkg/%{name}-%{version}.tar.gz
+Patch0:         foremost-broken-jpeg.patch
 # Upstream appears to not be using the sourceforge file release mechanism
 # Source0: http://dl.sf.net/%{name}/%{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -22,6 +23,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .jheader
 
 sed -i 's!/usr/local/etc/foremost.conf!%{_sysconfdir}/foremost.conf!' config.c
 sed -i 's/^RAW_FLAGS =.*/RAW_FLAGS = %{optflags}/' Makefile
@@ -49,6 +51,9 @@
 %config(noreplace) %{_sysconfdir}/foremost.conf
 
 %changelog
+* Mon Mar 24 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 1.5.3-2
+- Patch to fix segfaults with broken jpeg headers from bz#438631.
+
 * Tue Dec 04 2007 Toshio Kuratomi <a.badger at gmail.com> - 1.5.3-1
 - Update to 1.5.3.  This incorporates our previous patches.
 - Mass rebuild for new gcc.




More information about the fedora-extras-commits mailing list