[firebird] fix FTBFS if "-Werror=format-security" flag is used (bug #1037062)

Philippe Makowski makowski at fedoraproject.org
Sat Dec 7 14:26:30 UTC 2013


commit 7b5d8302bc68f8a1f99c8fd9bc719c55adb482fd
Author: Philippe Makowski <pmakowski at espelida.com>
Date:   Sat Dec 7 15:26:11 2013 +0100

    fix FTBFS if "-Werror=format-security" flag is used   (bug #1037062)

 firebird-2.5.2-svn-58886.patch |  164 ++++++++++++++++++++++++++++++++++++++++
 firebird.spec                  |    7 ++-
 2 files changed, 170 insertions(+), 1 deletions(-)
---
diff --git a/firebird-2.5.2-svn-58886.patch b/firebird-2.5.2-svn-58886.patch
new file mode 100644
index 0000000..dffced9
--- /dev/null
+++ b/firebird-2.5.2-svn-58886.patch
@@ -0,0 +1,164 @@
+Index: src/qli/lex.cpp
+===================================================================
+--- src/qli/lex.cpp	(révision 58885)
++++ src/qli/lex.cpp	(révision 58886)
+@@ -438,7 +438,7 @@
+ 	// UNIX flavor
+ 
+ 	if (prompt)
+-		printf(prompt);
++		printf("%s", prompt);
+ 
+ 	errno = 0;
+ 	TEXT* p = buffer;
+Index: src/dudley/ddl.cpp
+===================================================================
+--- src/dudley/ddl.cpp	(révision 58885)
++++ src/dudley/ddl.cpp	(révision 58886)
+@@ -718,7 +718,7 @@
+ 	}
+ 
+ 	for (;;) {
+-		printf(prompt);
++		printf("%s", prompt);
+ 		if (dudleyGlob.DDL_service)
+ 			putc('\001', stdout);
+ 		fflush(stdout);
+Index: src/dudley/lex.cpp
+===================================================================
+--- src/dudley/lex.cpp	(révision 58885)
++++ src/dudley/lex.cpp	(révision 58886)
+@@ -429,7 +429,7 @@
+ 	while (!(c = *DDL_char++)) {
+ 		DDL_char = DDL_buffer;
+ 		if (dudleyGlob.DDL_interactive) {
+-			printf(dudleyGlob.DDL_prompt);
++			printf("%s", dudleyGlob.DDL_prompt);
+ 			if (dudleyGlob.DDL_service)
+ 				putc('\001', stdout);
+ 			fflush(stdout);
+Index: src/lock/print.cpp
+===================================================================
+--- src/lock/print.cpp	(révision 58885)
++++ src/lock/print.cpp	(révision 58886)
+@@ -294,7 +294,7 @@
+ 			switch (c)
+ 			{
+ 			case '?':
+-				FPRINTF(outfile, usage);
++				FPRINTF(outfile, "%s", usage);
+ 				exit(FINI_OK);
+ 				break;
+ 
+Index: src/gpre/int_cxx.cpp
+===================================================================
+--- src/gpre/int_cxx.cpp	(révision 58885)
++++ src/gpre/int_cxx.cpp	(révision 58886)
+@@ -631,7 +631,7 @@
+ 	char s[MAX_REF_SIZE];
+ 
+ 	align(column);
+-	fprintf(gpreGlob.out_file, gen_name(s, action->act_object));
++	fprintf(gpreGlob.out_file, "%s", gen_name(s, action->act_object));
+ 
+ }
+ 
+Index: src/gpre/pat.cpp
+===================================================================
+--- src/gpre/pat.cpp	(révision 58885)
++++ src/gpre/pat.cpp	(révision 58886)
+@@ -458,11 +458,11 @@
+ #endif
+ 
+ 	default:
+-		fprintf(gpreGlob.out_file, buffer);
++		fputs(buffer, gpreGlob.out_file);
+ 		break;
+ 	}
+ #else
+-	fprintf(gpreGlob.out_file, buffer);
++	fputs(buffer, gpreGlob.out_file);
+ #endif
+ 
+ }
+Index: src/gpre/c_cxx.cpp
+===================================================================
+--- src/gpre/c_cxx.cpp	(révision 58885)
++++ src/gpre/c_cxx.cpp	(révision 58886)
+@@ -1145,7 +1145,7 @@
+ 			}
+ 		}
+ 		*q1 = 0;
+-		printa(indent, line);
++		printa(indent, "%s", line);
+ 		length = length - (q - p);
+ 		p = q;
+ 		if (first_line)
+@@ -2726,12 +2726,12 @@
+ 		if (p < limit)
+ 			continue;
+ 		*p = 0;
+-		printa(INDENT, buffer);
++		printa(INDENT, "%s", buffer);
+ 		p = buffer;
+ 	}
+ 
+ 	*p = 0;
+-	printa(INDENT, buffer);
++	printa(INDENT, "%s", buffer);
+ }
+ 
+ 
+@@ -3499,7 +3499,7 @@
+ {
+ 	TEXT s[MAX_REF_SIZE];
+ 
+-	printa(column, gen_name(s, action->act_object, false));
++	printa(column, "%s", gen_name(s, action->act_object, false));
+ }
+ 
+ 
+Index: src/gpre/pretty.cpp
+===================================================================
+--- src/gpre/pretty.cpp	(révision 58885)
++++ src/gpre/pretty.cpp	(révision 58886)
+@@ -294,7 +294,7 @@
+ 
+ 	print_line(control, offset);
+ 	sprintf(control->ctl_ptr, string, arg);
+-	fprintf(stderr, control->ctl_ptr);
++	fputs(control->ctl_ptr, stderr);
+ 	ADVANCE_PTR(control->ctl_ptr);
+ 	print_line(control, offset);
+ 
+Index: src/config/Args.cpp
+===================================================================
+--- src/config/Args.cpp	(révision 58885)
++++ src/config/Args.cpp	(révision 58886)
+@@ -177,7 +177,7 @@
+ 	}
+ 
+ 	if (helpText)
+-		printf (helpText);
++		printf ("%s", helpText);
+ 
+ 	printf ("Options are:\n");
+ 
+@@ -201,7 +201,7 @@
+ 	for (;;)
+ 	{
+ 		if (msg)
+-			printf (msg);
++			printf ("%s", msg);
+ 		printf ("New password: ");
+ 		if (!fgets (pw1, length, stdin))
+ 			break;
+@@ -241,7 +241,7 @@
+ 	for (;;)
+ 	{
+ 		if (msg)
+-			printf (msg);
++			printf ("%s", msg);
+ 		if (!fgets (pw1, length, stdin))
+ 			break;
+ 		char *p = strchr (pw1, '\n');
diff --git a/firebird.spec b/firebird.spec
index 5b716db..40497bd 100644
--- a/firebird.spec
+++ b/firebird.spec
@@ -6,7 +6,7 @@
 Summary: SQL relational database management system
 Name:  firebird
 Version: 2.5.2.26539.0
-Release: 8%{?dist}
+Release: 9%{?dist}
 
 Group:  Applications/Databases
 License: Interbase
@@ -25,6 +25,7 @@ Source7: firebird-superserver.service
 # from upstream
 Patch0: firebird-2.5.2-svn-CORE-3946.patch
 Patch1: firebird-2.5.2-svn-CORE-4058.patch
+Patch4: firebird-2.5.2-svn-58886.patch
 
 Patch2: firebird-btyacc-fpie.patch
 Patch3: firebird-aarch64.patch
@@ -167,6 +168,7 @@ Multi-process, local client libraries for Firebird SQL RDBMS
 %patch1
 %patch2
 %patch3 -p1
+%patch4 -p0
 # convert intl character to UTF-8
 iconv -f ISO-8859-1 -t utf-8 -c ./doc/README.intl     -o ./doc/README.intl
 
@@ -527,6 +529,9 @@ fi
 
 
 %changelog
+* Sat Dec 07 2013 Philippe Makowski <makowski at fedoraproject.org>  2.5.2.26539.0-9
+- fix FTBFS if "-Werror=format-security" flag is used   (bug #1037062)
+
 * Thu Aug 08 2013 Philippe Makowski <makowski at fedoraproject.org>  2.5.2.26539.0-8
 - add BR libatomic_ops-static  (bug #993439)
 


More information about the scm-commits mailing list