[wcstools] 02/03: Install wcscat.h; Fix crashes found by the mayhem tool.

Ole Streicher olebole-guest at moszumanska.debian.org
Fri Jul 18 08:42:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository wcstools.

commit 65491a6b92ebfb95c3d474fe16a20000c39fae56
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Jul 18 10:41:24 2014 +0200

    Install wcscat.h; Fix crashes found by the mayhem tool.
---
 debian/changelog                |  2 +
 debian/patches/fix_mayhem.patch | 85 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 3 files changed, 88 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c526acc..a6a96c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 wcstools (3.8.7-2) unstable; urgency=low
 
   * Install wcscat.h. Closes: #717942
+  * Fix crashes found by the mayhem tool. Closes: #715682, #715755,
+    #715905, #715956, #715957
 
  -- Ole Streicher <debian at liska.ath.cx>  Sat, 27 Jul 2013 17:24:33 +0200
 
diff --git a/debian/patches/fix_mayhem.patch b/debian/patches/fix_mayhem.patch
new file mode 100644
index 0000000..eab8518
--- /dev/null
+++ b/debian/patches/fix_mayhem.patch
@@ -0,0 +1,85 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Fix several bugs that appear in during the mayhem tests.
+Bug: http://bugs.debian.org/715682
+Bug: http://bugs.debian.org/715755
+Bug: http://bugs.debian.org/715905
+Bug: http://bugs.debian.org/715956
+Bug: http://bugs.debian.org/715957
+--- a/getfits.c
++++ b/getfits.c
+@@ -109,6 +109,7 @@
+ 		usage ("Right ascension given but no declination");
+ 	    else {
+ 		strcpy (rastr, *av);
++		ac--;
+ 		strcpy (decstr, *++av);
+ 		ra0 = str2ra (rastr);
+ 		dec0 = str2dec (decstr);
+--- a/getpix.c
++++ b/getpix.c
+@@ -73,6 +73,7 @@
+     char *crange;       /* Column range string */
+     char *rstr;
+     char *dstr = NULL;
++    char rastr[32], decstr[32];
+     char *cstr;
+     int systemp;
+     int i;
+@@ -208,11 +209,11 @@
+ 	    if (ac < 2)
+ 		usage ();
+ 	    else {
+-		strcpy (rstr, *av);
++		strcpy (rastr, *av);
+ 		ac--;
+-		strcpy (dstr, *++av);
+-		ra0 = str2ra (rstr);
+-		dec0 = str2dec (dstr);
++		strcpy (decstr, *++av);
++		ra0 = str2ra (rastr);
++		dec0 = str2dec (decstr);
+ 		ac--;
+ 		if (ac < 1) {
+ 		    syscoor = WCS_J2000;
+--- a/bincat.c
++++ b/bincat.c
+@@ -156,7 +156,7 @@
+ 	    if (ac < 3)
+ 		usage((char)0, "3 arguments needed for center coordinate");
+ 	    else {
+-		strcpy (rastr, *++av);
++		strcpy (rastr, *av);
+ 		ac--;
+ 		strcpy (decstr, *++av);
+ 		setcenter (rastr, decstr);
+--- a/cphead.c
++++ b/cphead.c
+@@ -137,7 +137,7 @@
+ 		    break;
+ 	
+ 		case 'w': /* Copy entire WCS */
+-		    nkwd1 = 87;
++		    nkwd1 = 236;
+ 		    if (nkwd + nkwd1 > maxnkwd) {
+ 			maxnkwd = nkwd + nkwd1 + 32;
+ 			kwdnew = (char **) calloc (maxnkwd, sizeof (void *));
+@@ -148,7 +148,7 @@
+ 			free (kwd);
+ 			kwd = kwdnew;
+ 			}
+-		    for (ikwd = nkwd; i < nkwd+nkwd1; i++) {
++		    for (ikwd = nkwd; ikwd < nkwd+nkwd1+32; ikwd++) {
+ 			kwd[ikwd] = (char *) calloc (32, 1);
+ 			}
+ 		    strcpy (kwd[nkwd], "RA");
+--- a/filext.c
++++ b/filext.c
+@@ -80,7 +80,7 @@
+ 		    ext = ext + 1;
+ 		}
+ 	    }
+-	printf ("%s\n", ext);
++	printf ("%s\n", (ext)?ext:"");
+ 	}
+ 
+     return (0);
diff --git a/debian/patches/series b/debian/patches/series
index 7dc1aa5..f57c30f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ makefiles.patch
 fix_spelling.patch
 fix_manpages.patch
 use_abort.patch
+fix_mayhem.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/wcstools.git



More information about the debian-science-commits mailing list