public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Kacper Kowalik (xarthisius)" <xarthisius@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in sci-astronomy/wcstools/files: wcstools-3.8.1-overflows.patch wcstools-3.8.1-format.patch wcstools-3.8.1-autotools.patch wcstools-3.8.1-invalid_free.patch wcstools-3.8.1-implicits.patch wcstools-3.7-autotools.patch wcstools-3.7.0-fix-leaks.patch
Date: Fri, 10 Sep 2010 10:25:59 +0000 (UTC)	[thread overview]
Message-ID: <20100910102559.C548820051@flycatcher.gentoo.org> (raw)

xarthisius    10/09/10 10:25:59

  Added:                wcstools-3.8.1-overflows.patch
                        wcstools-3.8.1-format.patch
                        wcstools-3.8.1-autotools.patch
                        wcstools-3.8.1-invalid_free.patch
                        wcstools-3.8.1-implicits.patch
  Removed:              wcstools-3.7-autotools.patch
                        wcstools-3.7.0-fix-leaks.patch
  Log:
  Fix multiple QA issues: implicit function declarations, invalid free, overflows, wrong printf format. Fixes bug 336601. Thanks to Diego for the report. Drop old.
  
  (Portage version: 2.2_rc77/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch?rev=1.1&content-type=text/plain

Index: wcstools-3.8.1-overflows.patch
===================================================================
 call to {} will always overflow destination buffer
* In function ‘strcpy’, inlined from ‘CopyValues’ at cphead.c:579:9
* In function ‘strcpy’, inlined from ‘CopyValues’ at cphead.c:602:14
* In function ‘strcpy’, inlined from ‘SetValues’ at sethead.c:1134:9
* In function ‘strcpy’, inlined from ‘SetValues’ at sethead.c:1177:14
* In function ‘strcpy’, inlined from ‘ChangeKeyNames’ at keyhead.c:469:9
* In function ‘strcpy’, inlined from ‘ChangeKeyNames’ at keyhead.c:487:14
* In function ‘strcpy’, inlined from ‘ConvertDate’ at getdate.c:452:12

--- wcstools-3.8.1/cphead.c
+++ wcstools-3.8.1/cphead.c
@@ -372,7 +372,7 @@
     char *ltime;
     int naxis, ipos, nbhead, nbr, nbw;
     int fdr, fdw;
-    char history[72];
+    char history[75];
     char echar;
     char *endchar;
     int imageread = 0;
@@ -574,7 +574,7 @@
 
     /* Add history to header */
     if (keyset || histset) {
-	if (hgets (headout, "CPHEAD", 72, history))
+	if (hgets (headout, "CPHEAD", 75, history))
 	    hputc (headout, "HISTORY", history);
 	strcpy (history, RevMsg);
 	endchar = strchr (history, ',');
@@ -593,7 +593,7 @@
 	    lkwd = strlen (kwd[ikwd]);
 
 	    /* If too may keywords, start a second history line */
-	    if (lhist + lkwd + 10 > 71) {
+	    if (lhist + lkwd + 10 > 74) {
 		if (histset) {
 		    if (history[lhist-2] == ',')
 			history[lhist-2] = (char) 0;
--- wcstools-3.8.1/sethead.c
+++ wcstools-3.8.1/sethead.c
@@ -616,7 +616,7 @@
     int nbold, nbnew;
     int imageread = 0;
     char cval[24];
-    char history[72];
+    char history[76];
     char *endchar;
     char *ltime;
     char newkey[10];
@@ -891,7 +891,7 @@
 
 	    /* Add, subtract, multiply, or divide keyword value by constant */
 	    if (keyop) {
-		if (!hgets (header, opkey, 72,string)) {
+		if (!hgets (header, opkey, 76,string)) {
 		    if (verbose)
 			printf ("* %s %c %s keyword not in header.\n",
 			    opkey, ops[keyop], kwv);
@@ -1129,7 +1129,7 @@
 
     /* Add history to header */
     if (keyset || histset) {
-	if (hgets (header, "SETHEAD", 72, history))
+	if (hgets (header, "SETHEAD", 76, history))
 	    hputc (header, "HISTORY", history);
 	strcpy (history, RevMsg);
 	endchar = strchr (history, ',');
@@ -1170,7 +1170,7 @@
 	    lkwd = strlen (kwd[ikwd]);
 
 	    /* If too may keywords, start a second history line */
-	    if (lhist + lkwd + 10 > 71) {
+	    if (lhist + lkwd + 10 > 75) {
 		if (histset) {
 		    strcat (history, " updated");
 		    hputc (header, "HISTORY", history);
--- wcstools-3.8.1/keyhead.c
+++ wcstools-3.8.1/keyhead.c
@@ -283,7 +283,7 @@
     int imageread = 0;
     char cval[24];
     int fdr, fdw, ipos, nbr, nbw, nchange;
-    char history[72];
+    char history[76];
     char comment[72];
     char *endchar;
     char *ltime;
@@ -464,7 +464,7 @@
 
     /* Add history to header */
     if (keyset || histset) {
-	if (hgets (header, "KEYHEAD", 72, history))
+	if (hgets (header, "KEYHEAD", 76, history))
 	    hputc (header, "HISTORY", history);
 	strcpy (history, RevMsg);
 	endchar = strchr (history, ',');
@@ -480,7 +480,7 @@
 	    lkwd = strlen (kwd[ikwd]);
 
 	    /* If too may keywords, start a second history line */
-	    if (lhist + lkwd > 71) {
+	    if (lhist + lkwd > 75) {
 		if (histset) {
 		    strcat (history, " updated");
 		    hputc (header, "HISTORY", history);
--- wcstools-3.8.1/getdate.c
+++ wcstools-3.8.1/getdate.c
@@ -444,7 +444,7 @@
     char *fitsdate, *newfdate, *stdate;
     char temp[64];
     char fyear[16];
-    char ts0[8];
+    char ts0[9];
     char *tchar;
     int its, its1;
     time_t lts;



1.1                  sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch?rev=1.1&content-type=text/plain

Index: wcstools-3.8.1-format.patch
===================================================================
warning: too few arguments for format

--- libwcs/ucacread.c
+++ libwcs/ucacread.c
@@ -734,7 +734,7 @@
 		else if (ucat == UCAC2) {
 		    fprintf (stderr,"UCACRNUM: %11.6f: %9.5f %9.5f %5.2f",
 			     num, ra, dec, star->xmag[0]);
-		    fprintf (stderr," %5.2f %5.2f %5.2f %d %d",
+		    fprintf (stderr," %5.2f %5.2f %5.2f",
 			     star->xmag[1],star->xmag[2],star->xmag[3]);
 		    fprintf (stderr," %d %d\n",star->nimage,star->ncat);
 		    }
--- imcat.c
+++ imcat.c
@@ -1923,7 +1923,7 @@
 		    if (tabout && (refcat == UCAC2 || refcat == UCAC3)) {
 			era = gm[nmag][i] * cosdeg (gdec[i]) * 3600.0;
 			edec = gm[nmag+1][i] * 3600.0;
-			sprintf (temp, "	%5.3f	%5.3f");
+			sprintf (temp, "	%5.3f	%5.3f", era, edec);
 			strcat (headline, temp);
 			}
 		    for (imag = 0; imag < nmag; imag++) {



1.1                  sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch?rev=1.1&content-type=text/plain

Index: wcstools-3.8.1-autotools.patch
===================================================================
--- configure.ac.orig	1970-01-01 01:00:00.000000000 +0100
+++ configure.ac	2008-11-03 09:59:35.000000000 +0000
@@ -0,0 +1,11 @@
+AC_PREREQ([2.59])
+AC_INIT(wcstools, 3.8.1 , [http://tdc-www.harvard.edu/wcstools/])
+AM_INIT_AUTOMAKE([foreign])
+AM_CONFIG_HEADER(config.h)
+
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_C_CONST
+AC_CHECK_LIB(m, sin)
+AC_CONFIG_FILES([libwcs/Makefile libned/Makefile Makefile wcstools.pc])
+AC_OUTPUT
--- libned/Makefile.am.orig	1970-01-01 01:00:00.000000000 +0100
+++ libned/Makefile.am	2008-11-03 09:34:57.000000000 +0000
@@ -0,0 +1,5 @@
+lib_LTLIBRARIES = libned.la
+noinst_HEADERS = nedc.h  ned_client.h
+libned_la_SOURCES = \
+	ned_cli.c ned_cif.c ned_err.c ned_sk.c
+EXTRA_DIST = README
--- libwcs/Makefile.am.orig	1970-01-01 01:00:00.000000000 +0100
+++ libwcs/Makefile.am	2008-11-03 09:34:57.000000000 +0000
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libwcstools.la
+libwcstools_la_SOURCES = \
+	imsetwcs.c imgetwcs.c matchstar.c findstar.c daoread.c wcscon.c \
+	fitswcs.c wcsinit.c wcs.c ty2read.c webread.c tmcread.c \
+	gscread.c gsc2read.c ujcread.c uacread.c ubcread.c ucacread.c \
+	sdssread.c tabread.c binread.c ctgread.c actread.c catutil.c \
+	skybotread.c imrotate.c fitsfile.c imhfile.c \
+	hget.c hput.c imio.c dateutil.c imutil.c \
+	worldpos.c tnxpos.c dsspos.c platepos.c \
+	sortstar.c platefit.c iget.c fileutil.c \
+	wcslib.c lin.c cel.c proj.c sph.c wcstrig.c distort.c
+
+wcsdir = $(includedir)/wcs
+wcs_HEADERS = \
+	wcscat.h wcslib.h wcs.h lwcs.h fitshead.h fitsfile.h imio.h
+
+noinst_HEADERS = fitsfile1.h wcscat1.h
--- Makefile.am.orig	1970-01-01 01:00:00.000000000 +0100
+++ Makefile.am	2008-11-03 10:09:43.000000000 +0000
@@ -0,0 +1,80 @@
+SUBDIRS = libwcs libned
+INCLUDES = -I$(top_srcdir)/libwcs
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = wcstools.pc
+
+bin_SCRIPTS = wcstools
+
+EXTRA_DIST = wcstools COPYING Readme NEWS Programs
+
+bin_PROGRAMS = \
+	cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \
+	imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \
+	keyhead skycoor subpix xy2sky wcshead conpix gettab newfits getfits \
+	imstack imextract sumpix wcsremap getcol wcsgetdate imfill imsmooth imresize \
+	fileroot filename filext char2sp sp2char wcscrlf isnum isrange isfits \
+	simpos nedpos bincat nedname
+
+# these ones don't need libwcs
+wcscrlf_SOURCES = crlf.c
+filename_SOURCES = filename.c
+fileroot_SOURCES = fileroot.c
+filext_SOURCES = filext.c
+isrange_SOURCES = isrange.c
+
+LDADD = $(top_builddir)/libwcs/libwcstools.la
+
+bincat_SOURCES = bincat.c
+getcol_SOURCES = getcol.c
+wcsgetdate_SOURCES = getdate.c
+gethead_SOURCES = gethead.c
+getfits_SOURCES = getfits.c
+getpix_SOURCES = getpix.c
+gettab_SOURCES = gettab.c
+imcat_SOURCES = imcat.c
+imsize_SOURCES = imsize.c
+imstar_SOURCES = imstar.c
+imwcs_SOURCES = imwcs.c
+immatch_SOURCES = immatch.c
+scat_SOURCES = scat.c
+setpix_SOURCES = setpix.c
+skycoor_SOURCES = skycoor.c
+sumpix_SOURCES = sumpix.c
+xy2sky_SOURCES = xy2sky.c
+simpos_SOURCES = simpos.c
+
+addpix_SOURCES = addpix.c
+char2sp_SOURCES = char2sp.c
+conpix_SOURCES = conpix.c
+cphead_SOURCES = cphead.c
+delwcs_SOURCES = delwcs.c
+delhead_SOURCES = delhead.c
+edhead_SOURCES = edhead.c
+fixpix_SOURCES = fixpix.c
+i2f_SOURCES = i2f.c
+imfill_SOURCES = imfill.c
+imresize_SOURCES = imresize.c
+imsmooth_SOURCES = imsmooth.c
+imhead_SOURCES = imhead.c
+imrot_SOURCES = imrot.c
+imstack_SOURCES = imstack.c
+imextract_SOURCES = imextract.c
+isnum_SOURCES = isnum.c
+keyhead_SOURCES = keyhead.c
+newfits_SOURCES = newfits.c
+wcsremap_SOURCES = remap.c
+sethead_SOURCES = sethead.c
+sky2xy_SOURCES = sky2xy.c
+sp2char_SOURCES = sp2char.c
+subpix_SOURCES = subpix.c
+wcshead_SOURCES = wcshead.c
+
+nedname_SOURCES = nedname.c
+nedname_LDADD = \
+	$(top_builddir)/libned/libned.la \
+	$(top_builddir)/libwcs/libwcstools.la
+nedpos_SOURCES = nedpos.c
+nedpos_LDADD = \
+	$(top_builddir)/libned/libned.la \
+	$(top_builddir)/libwcs/libwcstools.la
--- wcstools.pc.in.orig	1970-01-01 01:00:00.000000000 +0100
+++ wcstools.pc.in	2008-11-03 10:30:59.000000000 +0000
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: World Coordinate System Library and Tools
+Version: @PACKAGE_VERSION@
+URL: http://tdc-www.harvard.edu/wcstools/
+Libs: -L${libdir} -lwcstools
+Libs.private: -lm
+Cflags: -I${includedir}/wcs
+



1.1                  sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch?rev=1.1&content-type=text/plain

Index: wcstools-3.8.1-invalid_free.patch
===================================================================
* imhfile.c:1022:10: warning: attempt to free a non-heap object ‘pixname’

--- wcstools-3.8.1/libwcs/imhfile.c
+++ wcstools-3.8.1/libwcs/imhfile.c
@@ -1019,7 +1019,6 @@
     nbw = write (fd, image, nbimage);
     close (fd);
 
-    free (pixname);
     return (nbw);
 }
 



1.1                  sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch?rev=1.1&content-type=text/plain

Index: wcstools-3.8.1-implicits.patch
===================================================================
* ned_sk.c:152:4: warning: implicit declaration of function ‘inet_addr’
* isfits.c:54:2: warning: implicit declaration of function ‘isfits’
* nedpos.c:130:6: warning: implicit declaration of function ‘isfile’
* nedpos.c:131:3: warning: implicit declaration of function ‘getfilelines’

--- wcstools-3.8.1/libned/ned_sk.c
+++ wcstools-3.8.1/libned/ned_sk.c
@@ -57,6 +57,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <netdb.h>
 
 #include <sys/resource.h>
--- wcstools-3.8.1/nedpos.c
+++ wcstools-3.8.1/nedpos.c
@@ -8,6 +8,7 @@
 #include <string.h>
 #include "libned/ned_client.h"
 #include "libwcs/wcs.h"
+#include "libwcs/fitsfile.h"
 
 static char *RevMsg = "NEDPOS 3.8.1, 14 December 2009, Doug Mink SAO";
 
--- wcstools-3.8.1/isfits.c
+++ wcstools-3.8.1/isfits.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "libwcs/fitshead.h"
+#include "libwcs/fitsfile.h"
 
 static char *RevMsg = "ISFITS WCSTools 3.8.1, 14 December 2009, Doug Mink (dmink@cfa.harvard.edu)";
 






                 reply	other threads:[~2010-09-10 10:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100910102559.C548820051@flycatcher.gentoo.org \
    --to=xarthisius@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox