diff --git a/corrida-0.96-11-formatsec.patch b/corrida-0.96-11-formatsec.patch new file mode 100644 index 0000000..c0c75cb --- /dev/null +++ b/corrida-0.96-11-formatsec.patch @@ -0,0 +1,35 @@ +From c539d49d06fea9c6a9efb4e684a8837b82889f7f Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 4 Dec 2013 23:16:52 +0100 +Subject: [PATCH] Fix build with -Werror=format-security + +Fedora, starting with version 21, will enable this flag in order to limit +potentially insecure uses of format strings. It is required for format strings +to be constant now. +--- + corrida/console.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/corrida/console.c b/corrida/console.c +index 29acc3b..de35b69 100644 +--- a/corrida/console.c ++++ b/corrida/console.c +@@ -15,14 +15,5 @@ void corrida_printf( char *message ) + + void console_printf( char *message ) + { +- gboolean corrida_printf_switch = TRUE; +- char string[MAX_CORRIDA_STRLEN]; +- +- if (corrida_printf_switch == TRUE) { +- strcpy (string, APPLICATION_NAME); +- strcat (string, ": "); +- strcat (string, message); +- strcat (string, "\n"); +- printf (string); +- } ++ printf (APPLICATION_NAME ": %s\n", message); + } +-- +1.8.4.2 + diff --git a/corrida.spec b/corrida.spec index 79e4e8e..fc11366 100644 --- a/corrida.spec +++ b/corrida.spec @@ -3,7 +3,7 @@ Name: corrida Version: %{version_major}.%{version_minor} -Release: 13%{?dist} +Release: 14%{?dist} Summary: Application for archivation of meteor observations Group: Amusements/Graphics @@ -12,6 +12,8 @@ URL: http://corrida.pkim.org/ Source0: http://corrida.pkim.org/releases/corrida-%{version_major}-%{version_minor}.tar.gz Source1: corrida.desktop Patch0: corrida-0.96-11-count.patch +# Sent by e-mail to jurmcc@gmail.com +Patch1: corrida-0.96-11-formatsec.patch BuildRequires: gtk2-devel BuildRequires: ImageMagick @@ -25,6 +27,7 @@ archivation of meteor observations. %prep %setup -q -n corrida-%{version_major}-%{version_minor} %patch0 -p1 -b .count +%patch1 -p1 -b .formatsec %build @@ -57,6 +60,9 @@ desktop-file-install %{SOURCE1} \ %changelog +* Wed Dec 04 2013 Lubomir Rintel - 0.96.11-14 +- Fix build with -Werror=format-security + * Thu Oct 24 2013 Lubomir Rintel - 0.96.11-13 - Bulk sad and useless attempt at consistent SPEC file formatting