commit dfbee8196bd67f4686da904704169789864e3d2c
Author: Fabrice Bellet <fabrice(a)bellet.info>
Date: Mon Sep 30 18:35:19 2013 +0200
new upstream release
.gitignore | 1 +
...-sure-that-n-is-not-being-set-as-format-t.patch | 108 +++----------------
...ke-ShivaVG-and-FGAdminUI-static-libraries.patch | 24 +++++
0002-use-snprintf-for-rotor-strings.patch | 98 ------------------
...ke-ShivaVG-and-FGAdminUI-static-libraries.patch | 15 ---
FlightGear.spec | 11 +-
sources | 2 +-
7 files changed, 49 insertions(+), 210 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index beb1d46..5ebbca1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ FlightGear-2.0.0.tar.gz
/flightgear-2.6.0.tar.bz2
/flightgear-2.8.0.tar.bz2
/flightgear-2.10.0.tar.bz2
+/flightgear-2.12.0.tar.bz2
diff --git a/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch
b/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch
index 1b033cf..a3788bf 100644
--- a/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch
+++ b/0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch
@@ -1,107 +1,33 @@
-From 611140c83aefbd72a8e099dce8595e1d6fc85766 Mon Sep 17 00:00:00 2001
+From 78d250ca468bcaa1dfb8f658d75ae324467bb9d6 Mon Sep 17 00:00:00 2001
From: Fabrice Bellet <fabrice(a)bellet.info>
-Date: Sun, 19 May 2013 16:53:09 +0200
-Subject: [PATCH 1/3] check to be sure that %n is not being set as format type
+Date: Sun, 22 Sep 2013 12:19:18 +0200
+Subject: [PATCH 1/2] check to be sure that %n is not being set as format type
(CVE-2012-2090)
---
- src/Cockpit/panel.cxx | 26 +++++++++++++++++++++++++-
- src/Environment/fgclouds.cxx | 9 +++++++++
- src/Network/generic.cxx | 9 +++++++++
- 3 files changed, 43 insertions(+), 1 deletion(-)
+ src/Environment/fgclouds.cxx | 9 +++++++++
+ 1 file changed, 9 insertions(+)
-diff --git a/src/Cockpit/panel.cxx b/src/Cockpit/panel.cxx
-index 3fbc199..09fb885 100644
---- a/src/Cockpit/panel.cxx
-+++ b/src/Cockpit/panel.cxx
-@@ -1174,8 +1174,18 @@ FGTextLayer::Chunk::Chunk (const string &text, const string
&fmt)
- : _type(FGTextLayer::TEXT), _fmt(fmt)
- {
- _text = text;
-- if (_fmt.empty())
-+ if (_fmt.empty()) {
- _fmt = "%s";
-+ } else {
-+ // It is never safe for _fmt.c_str to be %n.
-+ string unsafe ("%n");
-+ size_t found;
-+ found=_fmt.find(unsafe);
-+ if (found!=string::npos) {
-+ SG_LOG(SG_COCKPIT, SG_WARN, "format type contained %n, but this is unsafe,
reverting to %s");
-+ _fmt = "%s";
-+ }
-+ }
- }
-
- FGTextLayer::Chunk::Chunk (ChunkType type, const SGPropertyNode * node,
-@@ -1188,6 +1198,20 @@ FGTextLayer::Chunk::Chunk (ChunkType type, const SGPropertyNode *
node,
- _fmt = "%s";
- else
- _fmt = "%.2f";
-+ } else {
-+ // It is never safe for _fmt.c_str to be %n.
-+ string unsafe ("%n");
-+ size_t found;
-+ found=_fmt.find(unsafe);
-+ if (found!=string::npos) {
-+ if (type == TEXT_VALUE) {
-+ SG_LOG(SG_COCKPIT, SG_WARN, "format type contained %n, but this is unsafe,
reverting to %s");
-+ _fmt = "%s";
-+ } else {
-+ SG_LOG(SG_COCKPIT, SG_WARN, "format type contained %n, but this is unsafe,
reverting to %.2f");
-+ _fmt = "%.2f";
-+ }
-+ }
- }
- _node = node;
- }
diff --git a/src/Environment/fgclouds.cxx b/src/Environment/fgclouds.cxx
-index d5db1ed..33b9f42 100644
+index 6e77d9b..b17e53a 100644
--- a/src/Environment/fgclouds.cxx
+++ b/src/Environment/fgclouds.cxx
-@@ -224,6 +224,15 @@ void FGClouds::buildLayer(int iLayer, const string& name, double
coverage) {
+@@ -214,6 +214,15 @@ void FGClouds::buildLayer(int iLayer, const string& name, double
coverage) {
+ double count = acloud->getDoubleValue("count", 1.0);
tCloudVariety[CloudVarietyCount].count = count;
int variety = 0;
- cloud_name = cloud_name + "-%d";
-+ // It is never safe for cloud_name.c_str to be %n.
-+ string unsafe ("%n");
-+ size_t found;
++ // It is never safe for cloud_name.c_str to be %n.
++ string unsafe ("%n");
++ size_t found;
+
-+ found=cloud_name.find(unsafe);
-+ if (found!=string::npos) {
-+ SG_LOG(SG_GENERAL, SG_ALERT, "format type contained %n, but this is unsafe ,
ignore it");
-+ continue;
-+ }
++ found=cloud_name.find(unsafe);
++ if (found!=string::npos) {
++ SG_LOG(SG_GENERAL, SG_ALERT, "format type contained
%n, but this is unsafe , ignore it");
++ continue;
++ }
char variety_name[50];
do {
variety++;
-diff --git a/src/Network/generic.cxx b/src/Network/generic.cxx
-index 21f048c..96f6364 100644
---- a/src/Network/generic.cxx
-+++ b/src/Network/generic.cxx
-@@ -206,6 +206,8 @@ bool FGGeneric::gen_message_binary() {
-
- bool FGGeneric::gen_message_ascii() {
- string generic_sentence;
-+ string unsafe ("%n");
-+ size_t found;
- char tmp[255];
- length = 0;
-
-@@ -216,6 +218,13 @@ bool FGGeneric::gen_message_ascii() {
- generic_sentence += var_separator;
- }
-
-+ // It is never safe for _out_message[i].format.c_str to be %n.
-+ found=_out_message[i].format.find(unsafe);
-+ if (found!=string::npos) {
-+ SG_LOG(SG_COCKPIT, SG_WARN, "format type contained %n, but this is
unsafe, reverting to %s");
-+ _out_message[i].format = "%s";
-+ }
-+
- switch (_out_message[i].type) {
- case FG_INT:
- val = _out_message[i].offset +
--
-1.8.1.4
+1.8.3.1
diff --git a/0002-make-ShivaVG-and-FGAdminUI-static-libraries.patch
b/0002-make-ShivaVG-and-FGAdminUI-static-libraries.patch
new file mode 100644
index 0000000..d154ee7
--- /dev/null
+++ b/0002-make-ShivaVG-and-FGAdminUI-static-libraries.patch
@@ -0,0 +1,24 @@
+From e98eafec87cd3e506dbf0af294c6aec52214162d Mon Sep 17 00:00:00 2001
+From: Fabrice Bellet <fabrice(a)bellet.info>
+Date: Sun, 22 Sep 2013 12:21:23 +0200
+Subject: [PATCH 2/2] make ShivaVG and FGAdminUI static libraries
+
+---
+ utils/fgadmin/src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/fgadmin/src/CMakeLists.txt b/utils/fgadmin/src/CMakeLists.txt
+index 42b95d7..793452e 100644
+--- a/utils/fgadmin/src/CMakeLists.txt
++++ b/utils/fgadmin/src/CMakeLists.txt
+@@ -1,6 +1,6 @@
+
+ fltk_wrap_ui(FGAdminUI fgadmin.fl)
+-add_library(FGAdminUI ${FGAdminUI_FLTK_UI_SRCS})
++add_library(FGAdminUI STATIC ${FGAdminUI_FLTK_UI_SRCS})
+
+ add_executable(fgadmin fgadmin_funcs.cxx main.cxx untarka.c)
+ add_dependencies(fgadmin FGAdminUI)
+--
+1.8.3.1
+
diff --git a/FlightGear.spec b/FlightGear.spec
index 322b31f..0f76830 100644
--- a/FlightGear.spec
+++ b/FlightGear.spec
@@ -1,7 +1,7 @@
Name: FlightGear
Summary: The FlightGear Flight Simulator
-Version: 2.10.0
-Release: 8%{?dist}
+Version: 2.12.0
+Release: 1%{?dist}
License: GPLv2+
Group: Amusements/Games
Source0:
http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/flightgear-%...
@@ -15,8 +15,7 @@ Source5: fg-64.png
Source6: fg-128.png
Source7: COPYING
Patch1: 0001-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch
-Patch2: 0002-use-snprintf-for-rotor-strings.patch
-Patch3: 0003-make-ShivaVG-and-FGAdminUI-static-libraries.patch
+Patch2: 0002-make-ShivaVG-and-FGAdminUI-static-libraries.patch
URL:
http://www.flightgear.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -38,7 +37,6 @@ expanded and improved upon by anyone interested in contributing
%setup -q -n flightgear-%{version}
%patch1 -p1
%patch2 -p1
-%patch3 -p1
# make rpmlint happy
find -name \*.h -o -name \*.cpp -o -name \*.cxx -o -name \*.hxx \
@@ -120,6 +118,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/*/apps/*
%changelog
+* Sun Sep 22 2013 Fabrice Bellet <fabrice(a)bellet.info> - 2.12.0-1
+- new upstream release
+
* Thu Aug 15 2013 Ralf Corsépius <corsepiu(a)fedoraproject.org> - 2.10.0-8
- Rebuilt for OSG-3.2.0.
diff --git a/sources b/sources
index 2b22372..4946864 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ae7fc8d1e446c5d1fe2aa82ee41dcac5 flightgear-2.10.0.tar.bz2
+23e2de5f311f4cbe94ec3386736ee8a5 flightgear-2.12.0.tar.bz2