rpms/foremost/F-8 foremost-1.5-vargs.patch, NONE, 1.1 foremost-1.5-warnings.patch, NONE, 1.1 foremost.spec, 1.6, 1.7

Toshio くらとみ (toshio) fedora-extras-commits at redhat.com
Tue Dec 4 19:45:11 UTC 2007


Author: toshio

Update of /cvs/pkgs/rpms/foremost/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19121

Modified Files:
	foremost.spec 
Added Files:
	foremost-1.5-vargs.patch foremost-1.5-warnings.patch 
Log Message:

* Tue Dec 04 2007 Toshio Kuratomi <a.badger at gmail.com> - 1.5.2-2
- Fix segfault reported in RH BZ#356241.


foremost-1.5-vargs.patch:

--- NEW FILE foremost-1.5-vargs.patch ---
diff -up foremost-1.5.2/state.c.vargs foremost-1.5.2/state.c
--- foremost-1.5.2/state.c.vargs	2007-12-04 11:35:15.000000000 -0800
+++ foremost-1.5.2/state.c	2007-12-04 11:36:01.000000000 -0800
@@ -187,8 +187,11 @@ void audit_msg(f_state *s, char *format,
 	va_list argp;
 	va_start(argp, format);
 
-	if (get_mode(s, mode_verbose))
+	if (get_mode(s, mode_verbose)) {
 		print_message(s, format, argp);
+		va_end(argp);
+		va_start(argp, format);
+	}
 
 	vfprintf(s->audit_file, format, argp);
 	va_end(argp);

foremost-1.5-warnings.patch:

--- NEW FILE foremost-1.5-warnings.patch ---
diff -up foremost-1.5.2/engine.c.bak foremost-1.5.2/engine.c
--- foremost-1.5.2/engine.c.bak	2007-12-04 10:59:12.000000000 -0800
+++ foremost-1.5.2/engine.c	2007-12-04 10:59:24.000000000 -0800
@@ -143,7 +143,7 @@ unsigned char *bm_search(unsigned char *
 
 void setup_stream(f_state *s, f_info *i)
 {
-	unsigned char	buffer[MAX_STRING_LENGTH];
+	char	buffer[MAX_STRING_LENGTH];
 	u_int64_t	skip = (((u_int64_t) s->skip) * ((u_int64_t) s->block_size));
 #ifdef DEBUG
 	printf("s->skip=%d s->block_size=%d total=%llu\n",
diff -up foremost-1.5.2/main.h.bak foremost-1.5.2/main.h
--- foremost-1.5.2/main.h.bak	2007-12-04 11:01:07.000000000 -0800
+++ foremost-1.5.2/main.h	2007-12-04 11:01:47.000000000 -0800
@@ -104,7 +104,10 @@
 
 #ifdef __UNIX
 
+#ifndef __U16_TYPE
 #define __U16_TYPE unsigned short
+#endif
+
 #include <libgen.h>
 
 #ifndef BYTE_ORDER 


Index: foremost.spec
===================================================================
RCS file: /cvs/pkgs/rpms/foremost/F-8/foremost.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- foremost.spec	27 Nov 2007 01:55:37 -0000	1.6
+++ foremost.spec	4 Dec 2007 19:44:34 -0000	1.7
@@ -1,12 +1,14 @@
 Name:           foremost
 Version:        1.5.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Recover files by "carving" them from a raw disk
 
 Group:          Applications/File
 License:        Public Domain
 URL:            http://foremost.sf.net
 Source0:        http://foremost.sourceforge.net/pkg/%{name}-%{version}.tar.gz
+Patch0:         foremost-1.5-warnings.patch
+Patch1:         foremost-1.5-vargs.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 +24,9 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .warn
+%patch1 -p1 -b .vargs
+
 sed -i 's!/usr/local/etc/foremost.conf!%{_sysconfdir}/foremost.conf!' config.c
 sed -i 's/^RAW_FLAGS =.*/RAW_FLAGS = %{optflags}/' Makefile
 
@@ -48,6 +53,9 @@
 %config(noreplace) %{_sysconfdir}/foremost.conf
 
 %changelog
+* Tue Dec 04 2007 Toshio Kuratomi <a.badger at gmail.com> - 1.5.2-2
+- Fix segfault reported in RH BZ#356241.
+
 * Mon Nov 26 2007 Paul W. Frields <stickster at gmail.com> - 1.5.2-1
 - Update to 1.5.2 on foremost.sf.net
 




More information about the fedora-extras-commits mailing list