rpms/siril/devel siril-0.8-c99.patch, NONE, 1.1 siril-0.8-overflows.patch, NONE, 1.1 siril.spec, 1.6, 1.7

Lubomir Rintel lkundrak at fedoraproject.org
Mon Aug 3 11:49:06 UTC 2009


Author: lkundrak

Update of /cvs/pkgs/rpms/siril/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20131

Modified Files:
	siril.spec 
Added Files:
	siril-0.8-c99.patch siril-0.8-overflows.patch 
Log Message:
* Mon Aug 3 2009 Lubomir Rintel <lkundrak at v3.sk> - 0.8-8
- Fix build
- Fix out of string bound writes (#494536)


siril-0.8-c99.patch:
 proto.h |    2 ++
 utils.c |    2 ++
 2 files changed, 4 insertions(+)

--- NEW FILE siril-0.8-c99.patch ---
C99 adds isblank() to <ctype.h>, don't attempt to add a prototype
in case it exists and is a macro.

Lubomir Rintel <lkundrak at v3.sk>

diff -up siril-0.8/src/proto.h.c99 siril-0.8/src/proto.h
--- siril-0.8/src/proto.h.c99	2009-08-03 13:38:06.000000000 +0200
+++ siril-0.8/src/proto.h	2009-08-03 13:38:26.000000000 +0200
@@ -116,7 +116,9 @@ int 	copyfits(fits *from, fits *to, unsi
 int 	seqpreprocess(void);
 int		preprocess(fits *brut);
 double 	timing(int fin, char *info);
+#ifndef isblank
 int		isblank (int c);
+#endif
 char	*isempty(char *name);
 int		writeinitfile(void);
 int		readinitfile(void);
diff -up siril-0.8/src/utils.c.c99 siril-0.8/src/utils.c
--- siril-0.8/src/utils.c.c99	2009-08-03 13:38:37.000000000 +0200
+++ siril-0.8/src/utils.c	2009-08-03 13:38:47.000000000 +0200
@@ -40,7 +40,9 @@ static const char keywords[1][32]= {"wor
 #define NOTOK (-1)
 #define WD (0)
 
+#ifndef isblank
 int isblank (int c);
+#endif
 char error_buffer[256];
 
 extern cominfo com;

siril-0.8-overflows.patch:
 siril.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

--- NEW FILE siril-0.8-overflows.patch ---
Limits in callbacks.c's strncpy()s are far bigger that
actual length of these strings, so FORTIFY_SOURCE would
always abort (as warned at build-time). Extend them

Lubomir Rintel <lkundrak at v3.sk>

diff -up siril-0.8/src/callbacks.c.overflows siril-0.8/src/callbacks.c
diff -up siril-0.8/src/siril.h.overflows siril-0.8/src/siril.h
--- siril-0.8/src/siril.h.overflows	2009-08-03 13:44:16.000000000 +0200
+++ siril-0.8/src/siril.h	2009-08-03 13:45:13.000000000 +0200
@@ -112,16 +112,16 @@ typedef struct sequ sequence;
 struct sequ {
 	gboolean active;
 	int fixed;
-	char name[256];
+	char name[MAXGENLENGTH];
 	char *names;
-	char darkname[256];
-	char darkprefix[16];
-	char flatname[256];
-	char flatprefix[16];
-	char offsetname[256];
-	char offsetprefix[16];
-	char selprefix[16];
-	char ppprefix[16];
+	char darkname[MAXGENLENGTH];
+	char darkprefix[MAXGENLENGTH];
+	char flatname[MAXGENLENGTH];
+	char flatprefix[MAXGENLENGTH];
+	char offsetname[MAXGENLENGTH];
+	char offsetprefix[MAXGENLENGTH];
+	char selprefix[MAXGENLENGTH];
+	char ppprefix[MAXGENLENGTH];
 	int selnum;
 	int number;
 	char fli;


Index: siril.spec
===================================================================
RCS file: /cvs/pkgs/rpms/siril/devel/siril.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- siril.spec	27 Jul 2009 04:23:03 -0000	1.6
+++ siril.spec	3 Aug 2009 11:49:06 -0000	1.7
@@ -1,6 +1,6 @@
 Name:		siril
 Version:	0.8
-Release:	8%{?dist}
+Release:	9%{?dist}
 Summary:	Siril is an astronomical image processing software for Linux
 
 License:	GPLv2+
@@ -8,6 +8,8 @@ Group:		Applications/Engineering
 URL:		http://sourceforge.net/projects/siril/
 Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Patch0:         siril-0.8-nobuf.patch
+Patch1:         siril-0.8-c99.patch
+Patch2:         siril-0.8-overflows.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	gtk+-devel, fftw3-devel, cfitsio-devel, netpbm-devel
 Requires:	gtk+, fftw3, cfitsio
@@ -20,6 +22,8 @@ It's an astronomical image processing so
 %prep
 %setup -q
 %patch0 -p1 -b .nobuf
+%patch1 -p1 -b .c99
+%patch2 -p1 -b .overflows
 
 %build
 %configure
@@ -42,6 +46,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/siril/pixmaps/siril_1.xpm
 
 %changelog
+* Mon Aug 3 2009 Lubomir Rintel <lkundrak at v3.sk> - 0.8-8
+- Fix build
+- Fix out of string bound writes (#494536)
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list