[packages/NuSMV] - fix building with -Wformat-security - rel 3
baggins
baggins at pld-linux.org
Wed Nov 14 15:04:01 CET 2012
commit cf278024cf04a85a8f691ede22aa37f1f5290fc3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Nov 14 15:03:47 2012 +0100
- fix building with -Wformat-security
- rel 3
NuSMV.spec | 4 +++-
format-security.patch | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 1 deletion(-)
---
diff --git a/NuSMV.spec b/NuSMV.spec
index 2fa8b68..210aa5c 100644
--- a/NuSMV.spec
+++ b/NuSMV.spec
@@ -9,7 +9,7 @@ Summary: New Symbolic Model Verifier
Summary(pl.UTF-8): Nowy weryfikator modeli symbolicznych
Name: NuSMV
Version: 2.5.4
-Release: 2
+Release: 3
License: LGPL
Group: Applications
Source0: http://nusmv.irst.itc.it/distrib/%{name}-%{version}.tar.gz
@@ -20,6 +20,7 @@ Source2: http://www.princeton.edu/~chaff/zchaff/zchaff.%{zchaff_ver}.zip
# Source2-md5: 7398b3e984a5046755cb3ef6b0e44d2e
Patch0: %{name}-build.patch
Patch1: %{name}-solvers.patch
+Patch2: format-security.patch
URL: http://nusmv.irst.itc.it/
BuildRequires: autoconf
BuildRequires: automake
@@ -103,6 +104,7 @@ install %{SOURCE1} MiniSat/
install %{SOURCE2} zchaff/
%patch1 -p1
+%patch2 -p1
%build
ICFLAGS="%{rpmcflags} -fPIC"
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..d48a2d6
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,62 @@
+--- NuSMV-2.5.4/nusmv/src/prop/Prop.c~ 2011-10-21 17:41:39.000000000 +0200
++++ NuSMV-2.5.4/nusmv/src/prop/Prop.c 2012-11-14 14:47:55.753785880 +0100
+@@ -1634,7 +1634,7 @@
+ }
+
+ indent(file);
+- fprintf(file, prop);
++ fputs(prop, file);
+
+ if (len > 40) {
+ fprintf(file, " [...]");
+--- NuSMV-2.5.4/nusmv/src/cinit/cinitData.c~ 2011-10-12 11:04:37.000000000 +0200
++++ NuSMV-2.5.4/nusmv/src/cinit/cinitData.c 2012-11-14 14:50:21.413780736 +0100
+@@ -439,7 +439,7 @@
+ else {
+ const char* preps_fmt = "Warning: there are no available preprocessors";
+ preps_tmp = ALLOC(char, strlen(preps_fmt) + 1);
+- sprintf(preps_tmp, preps_fmt);
++ sprintf(preps_tmp, "%s", preps_fmt);
+ }
+
+ tmp = ALLOC(char, strlen(fmt) + strlen(preps_tmp) + 1);
+--- NuSMV-2.5.4/nusmv/src/hrc/dumpers/HrcDumper_private.h~ 2011-10-12 11:04:37.000000000 +0200
++++ NuSMV-2.5.4/nusmv/src/hrc/dumpers/HrcDumper_private.h 2012-11-14 14:57:59.607097908 +0100
+@@ -106,13 +106,13 @@
+ #define _HRC_DUMP_STR(x) \
+ { \
+ hrc_dumper_dump_indent(self); \
+- fprintf(self->fout, x); \
++ fputs(x, self->fout); \
+ }
+
+ #define _HRC_DUMP_STR_NL(x) \
+ { \
+ hrc_dumper_dump_indent(self); \
+- fprintf(self->fout, x); \
++ fputs(x, self->fout); \
+ hrc_dumper_nl(self); \
+ }
+
+--- NuSMV-2.5.4/nusmv/src/hrc/dumpers/HrcDumperXml_private.h~ 2011-10-12 11:04:37.000000000 +0200
++++ NuSMV-2.5.4/nusmv/src/hrc/dumpers/HrcDumperXml_private.h 2012-11-14 14:59:17.827095149 +0100
+@@ -92,7 +92,7 @@
+ #define _HRC_DUMP_STR_NL(x) \
+ { \
+ hrc_dumper_dump_indent(self); \
+- fprintf(self->fout, x); \
++ fputs(x, self->fout); \
+ if (self->use_indentation) { \
+ hrc_dumper_nl(self); \
+ } \
+--- NuSMV-2.5.4/nusmv/src/addons_core/compass/sigref/sigrefWrite.c~ 2011-10-12 11:04:36.000000000 +0200
++++ NuSMV-2.5.4/nusmv/src/addons_core/compass/sigref/sigrefWrite.c 2012-11-14 15:00:08.280426703 +0100
+@@ -509,7 +509,7 @@
+
+ DdManager* dd = BddEnc_get_dd_manager(enc);
+
+- fprintf(file, SIGREF_HEADER);
++ fprintf(file, "%s", SIGREF_HEADER);
+ fprintf(file, "\n<%s ", MODEL_TAG);
+ fprintf(file, MODEL_FM, MODEL_TYPE);
+ fprintf(file, ">\n");
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/NuSMV.git/commitdiff/cf278024cf04a85a8f691ede22aa37f1f5290fc3
More information about the pld-cvs-commit
mailing list