[GMT/el5/master] - Update to 4.5.3 - Bump coastlines requirement to 2.1.0 - Fix buffer overflow in psimage (bug #6173

Orion Poplawski orion at fedoraproject.org
Thu Aug 12 22:01:13 UTC 2010


commit f2174b988cbafd115a4ce5522a6ec70eac31ab04
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Thu Aug 12 16:01:14 2010 -0600

    - Update to 4.5.3
    - Bump coastlines requirement to 2.1.0
    - Fix buffer overflow in psimage (bug #617332)
    - Enable experimental support for grid input via GDAL

 .gitignore                  |    4 ++++
 GMT-4.5.3-bufoverflow.patch |   20 ++++++++++++++++++++
 GMT.spec                    |   18 +++++++++++++++---
 sources                     |    8 ++++----
 4 files changed, 43 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2f93a4a..fdce90d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,7 @@ GMT4.5.1_doc.tar.bz2
 GMT4.5.1_share.tar.bz2
 GMT4.5.1_src.tar.bz2
 GMT4.5.1_suppl.tar.bz2
+GMT4.5.3_doc.tar.bz2
+GMT4.5.3_share.tar.bz2
+GMT4.5.3_src.tar.bz2
+GMT4.5.3_suppl.tar.bz2
diff --git a/GMT-4.5.3-bufoverflow.patch b/GMT-4.5.3-bufoverflow.patch
new file mode 100644
index 0000000..4751ca0
--- /dev/null
+++ b/GMT-4.5.3-bufoverflow.patch
@@ -0,0 +1,20 @@
+--- GMT4.5.3/src/psimage.c.bufoverflow	2010-03-23 20:36:44.000000000 -0600
++++ GMT4.5.3/src/psimage.c	2010-07-22 14:38:28.866393323 -0600
+@@ -32,7 +32,7 @@
+ 	struct C {	/* -C<xpos>/<ypos>[/<justify>] */
+ 		GMT_LONG active;
+ 		double x, y;
+-		char justify[2];
++		char justify[3];
+ 	} C;
+ 	struct E {	/* -E<dpi> */
+ 		GMT_LONG active;
+@@ -114,7 +114,7 @@
+ 
+ 				case 'C':
+ 					Ctrl->C.active = TRUE;
+-					n = sscanf (&argv[i][2], "%[^/]/%[^/]/%s", txt_a, txt_b, Ctrl->C.justify);
++					n = sscanf (&argv[i][2], "%[^/]/%[^/]/%2s", txt_a, txt_b, Ctrl->C.justify);
+ 					if (n < 2 || n > 3) {
+ 						fprintf (stderr, "%s ERROR: Syntax is -C<xpos>/<ypos>[/<justify>]\n", GMT_program);
+ 						error++;
diff --git a/GMT.spec b/GMT.spec
index 113663b..c5f3454 100644
--- a/GMT.spec
+++ b/GMT.spec
@@ -7,7 +7,7 @@
 %define octave_octdir %(octave-config -p LOCALAPIOCTFILEDIR || echo)
 
 Name:           GMT
-Version:        4.5.2
+Version:        4.5.3
 Release:        1%{?dist}
 Summary:        Generic Mapping Tools
 
@@ -18,8 +18,11 @@ Source0:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_src.tar.bz2
 Source1:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_share.tar.bz2
 Source2:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_suppl.tar.bz2
 Source3:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_doc.tar.bz2
+#Fix buffer overflow in psimage (bug #617332)
+Patch1:         GMT-4.5.3-bufoverflow.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRequires:  gdal-devel
 BuildRequires:  libXt-devel libXaw-devel libXmu-devel libXext-devel
 BuildRequires:  netcdf-devel
 BuildRequires:  GMT-coastlines
@@ -28,7 +31,7 @@ BuildRequires:  ncurses-devel
 # less is detected by configure, and substituted in GMT.in
 BuildRequires:  less
 Requires:       less
-Requires:       GMT-coastlines >= 2.0.2
+Requires:       GMT-coastlines >= 2.1.0
 Provides:       gmt = %{version}-%{release}
 
 %description
@@ -102,6 +105,7 @@ GMT 2 dimensional grids.
 
 %prep
 %setup -q -b1 -b2 -b3 -n GMT%{version}
+%patch1 -p1 -b .bufoverflow
 #We don't care about .bat files
 find -name \*.bat | xargs rm
 #Fix permissions
@@ -112,9 +116,11 @@ find -name \*.c | xargs chmod a-x
 export CSH=sh
 export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/netcdf-3"
 export NETCDF_LIB="%{_libdir}/netcdf-3"
+export GDAL_INC=%{_includedir}/gdal
 %configure --datadir=%{gmthome} \
            --enable-debug \
            --enable-shared \
+           --enable-gdal \
            --enable-octave --enable-mex-mdir=%{octave_mdir} \
            --enable-mex-xdir=%{octave_octdir} \
            --disable-rpath
@@ -158,7 +164,7 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}
 #Link in the coastline data
 ln -s %{gmthome}/coast $RPM_BUILD_DIR/GMT%{version}/share
 
-#Run the examples - not that this doesn't return errors if any fail, check logs!
+#Run the examples - note that this doesn't return errors if any fail, check logs!
 make run-examples
 
 
@@ -220,6 +226,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Aug 12 2010 Orion Poplawski <orion at cora.nwra.com> 4.5.3-1
+- Update to 4.5.3
+- Bump coastlines requirement to 2.1.0
+- Fix buffer overflow in psimage (bug #617332)
+- Enable experimental support for grid input via GDAL
+
 * Thu Feb 18 2010 Orion Poplawski <orion at cora.nwra.com> 4.5.2-1
 - Update to 4.5.2
 
diff --git a/sources b/sources
index a3479c9..9e26c6f 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-ee97a570d6d18459ed5eb8eb1c4bcfe0  GMT4.5.2_doc.tar.bz2
-101ec440d66fe9cee4689272cf29d1ec  GMT4.5.2_share.tar.bz2
-1cecd3588a117e19f82a3fbf46ed094d  GMT4.5.2_src.tar.bz2
-f61a1109a7a6119524e70efb6047b614  GMT4.5.2_suppl.tar.bz2
+a2f0243bbbea4c6e1472a1d92a2c6d7c  GMT4.5.3_doc.tar.bz2
+378ea1b0e46b09455722df81c4c191ab  GMT4.5.3_share.tar.bz2
+ad069cfcc8216fdef69e0cb94536c2a6  GMT4.5.3_src.tar.bz2
+7d4bcb2ac56ee558cae8446363a74e64  GMT4.5.3_suppl.tar.bz2


More information about the scm-commits mailing list