From 1ff17a0a53c82177abf350363567b2e0812846d8 Mon Sep 17 00:00:00 2001 From: Kacper Kowalik Date: Fri, 10 Sep 2010 10:25:59 +0000 Subject: 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) --- sci-astronomy/wcstools/ChangeLog | 15 ++- .../wcstools/files/wcstools-3.7-autotools.patch | 141 --------------------- .../wcstools/files/wcstools-3.7.0-fix-leaks.patch | 43 ------- .../wcstools/files/wcstools-3.8.1-autotools.patch | 141 +++++++++++++++++++++ .../wcstools/files/wcstools-3.8.1-format.patch | 24 ++++ .../wcstools/files/wcstools-3.8.1-implicits.patch | 35 +++++ .../files/wcstools-3.8.1-invalid_free.patch | 12 ++ .../wcstools/files/wcstools-3.8.1-overflows.patch | 116 +++++++++++++++++ sci-astronomy/wcstools/wcstools-3.7.7.ebuild | 53 -------- sci-astronomy/wcstools/wcstools-3.8.1-r1.ebuild | 57 +++++++++ sci-astronomy/wcstools/wcstools-3.8.1.ebuild | 52 -------- 11 files changed, 399 insertions(+), 290 deletions(-) delete mode 100644 sci-astronomy/wcstools/files/wcstools-3.7-autotools.patch delete mode 100644 sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch create mode 100644 sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch delete mode 100644 sci-astronomy/wcstools/wcstools-3.7.7.ebuild create mode 100644 sci-astronomy/wcstools/wcstools-3.8.1-r1.ebuild delete mode 100644 sci-astronomy/wcstools/wcstools-3.8.1.ebuild (limited to 'sci-astronomy/wcstools') diff --git a/sci-astronomy/wcstools/ChangeLog b/sci-astronomy/wcstools/ChangeLog index 40061fa11ed4..06f4604b5d91 100644 --- a/sci-astronomy/wcstools/ChangeLog +++ b/sci-astronomy/wcstools/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for sci-astronomy/wcstools # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/ChangeLog,v 1.17 2010/01/29 06:51:38 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/ChangeLog,v 1.18 2010/09/10 10:25:59 xarthisius Exp $ + +*wcstools-3.8.1-r1 (10 Sep 2010) + + 10 Sep 2010; Kacper Kowalik + -files/wcstools-3.7.0-fix-leaks.patch, -wcstools-3.7.7.ebuild, + -files/wcstools-3.7-autotools.patch, -wcstools-3.8.1.ebuild, + +wcstools-3.8.1-r1.ebuild, +files/wcstools-3.8.1-autotools.patch, + +files/wcstools-3.8.1-format.patch, +files/wcstools-3.8.1-implicits.patch, + +files/wcstools-3.8.1-invalid_free.patch, + +files/wcstools-3.8.1-overflows.patch: + Fix multiple QA issues: implicit function declarations, invalid free, + overflows, wrong printf format. Fixes bug 336601. Thanks to Diego for the + report. Drop old. *wcstools-3.8.1 (29 Jan 2010) diff --git a/sci-astronomy/wcstools/files/wcstools-3.7-autotools.patch b/sci-astronomy/wcstools/files/wcstools-3.7-autotools.patch deleted file mode 100644 index 761dff4ed232..000000000000 --- a/sci-astronomy/wcstools/files/wcstools-3.7-autotools.patch +++ /dev/null @@ -1,141 +0,0 @@ ---- 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.7.x, [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 remap getcol getdate imfill imsmooth imresize \ -+ fileroot filename filext char2sp sp2char crlf isnum isrange isfits \ -+ simpos nedpos bincat nedname -+ -+# these ones don't need libwcs -+crlf_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 -+getdate_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 -+remap_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 -+ diff --git a/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch b/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch deleted file mode 100644 index 737f6d230dae..000000000000 --- a/sci-astronomy/wcstools/files/wcstools-3.7.0-fix-leaks.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- libwcs/imhfile.c.orig 2007-09-11 11:01:02.247828794 +0100 -+++ libwcs/imhfile.c 2007-09-11 11:00:39.330522811 +0100 -@@ -1036,11 +1036,11 @@ - int len; - char *newpixname; - -- newpixname = (char *) calloc (SZ_IM2PIXFILE, 1); -+ newpixname = (char *) calloc (SZ_IM2PIXFILE + 1, sizeof(char)); - - /* Pixel file is in same directory as header */ - if (strncmp(pixname, "HDR$", 4) == 0 ) { -- (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); -+ strncpy (newpixname, hdrname, SZ_IM2PIXFILE); - - /* find the end of the pathname */ - len = strlen (newpixname); -@@ -1053,7 +1053,7 @@ - - /* add name */ - newpixname[len] = '\0'; -- (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); -+ strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); - } - - /* Bare pixel file with no path is assumed to be same as HDR$filename */ ---- libwcs/imsetwcs.c.orig 2007-09-11 11:04:54.757078741 +0100 -+++ libwcs/imsetwcs.c 2007-09-11 11:04:31.563757029 +0100 -@@ -854,13 +854,13 @@ - if (gc) free ((char *)gc); - - /* Free memory used for object names in reference catalog */ -- if (gobj1 != NULL) { -+ /* if (gobj1 != NULL) { - for (i = 0; i < ns; i++) { - if (gobj[i] != NULL) free (gobj[i]); - gobj[i] = NULL; - } - } -- -+ */ - /* Free image source arrays */ - if (sx) free ((char *)sx); - if (sy) free ((char *)sy); diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch b/sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch new file mode 100644 index 000000000000..f41d00add07c --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.8.1-autotools.patch @@ -0,0 +1,141 @@ +--- 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 ++ diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch b/sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch new file mode 100644 index 000000000000..32bc9c350dc6 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.8.1-format.patch @@ -0,0 +1,24 @@ +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++) { diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch b/sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch new file mode 100644 index 000000000000..df857e7bce37 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.8.1-implicits.patch @@ -0,0 +1,35 @@ +* 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 + #include + #include ++#include + #include + + #include +--- wcstools-3.8.1/nedpos.c ++++ wcstools-3.8.1/nedpos.c +@@ -8,6 +8,7 @@ + #include + #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 + #include + #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)"; + diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch b/sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch new file mode 100644 index 000000000000..40a5649997a7 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.8.1-invalid_free.patch @@ -0,0 +1,12 @@ +* 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); + } + diff --git a/sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch b/sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch new file mode 100644 index 000000000000..863fb6731d68 --- /dev/null +++ b/sci-astronomy/wcstools/files/wcstools-3.8.1-overflows.patch @@ -0,0 +1,116 @@ + 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; diff --git a/sci-astronomy/wcstools/wcstools-3.7.7.ebuild b/sci-astronomy/wcstools/wcstools-3.7.7.ebuild deleted file mode 100644 index b9ab73e43073..000000000000 --- a/sci-astronomy/wcstools/wcstools-3.7.7.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/wcstools-3.7.7.ebuild,v 1.3 2009/09/09 16:06:30 bicatali Exp $ - -EAPI=2 -inherit eutils autotools - -DESCRIPTION="World Coordinate System library for astronomical FITS images" -HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools" -SRC_URI="http://tdc-www.harvard.edu/software/${PN}/${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="" - -src_prepare() { - epatch "${FILESDIR}"/${PN}-3.7.0-fix-leaks.patch - epatch "${FILESDIR}"/${PN}-3.7-autotools.patch - # avoid colliding with fixdos, getdate and remap from other packages - sed -i \ - -e 's/getdate/wcsgetdate/' \ - -e 's/crlf/wcscrlf/' \ - -e 's/remap/wcsremap/' \ - wcstools Makefile.am || die - sed -i -e "s/3.7.x/${PV}/" "${S}"/configure.ac || die "sed failed" - eautoreconf -} - -src_test() { - einfo "Testing various wcstools programs" - ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed" - ./sethead test.fits A=1 B=1 || die "test sethead failed" - [[ "$(./gethead test.fits RA)" == "16:32:00.000" ]] \ - || die "test gethead failed" - rm -f test.fits -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - doman Man/man1/* || die "doman failed" - dodoc Readme Programs NEWS libned/NED_client || die "dodoc failed" - newdoc libwcs/Readme Readme.libwcs || die "newdoc failed" - newdoc libwcs/NEWS NEWS.libwcs || die "newdoc failed" -} - -pkg_postinst() { - elog "The following execs have been renamed to avoid colliding" - elog "with other packages:" - elog " getdate -> wcsgetdate" - elog " crlf -> wcscrlf" - elog " remap -> wcsremap" -} diff --git a/sci-astronomy/wcstools/wcstools-3.8.1-r1.ebuild b/sci-astronomy/wcstools/wcstools-3.8.1-r1.ebuild new file mode 100644 index 000000000000..d8701007de35 --- /dev/null +++ b/sci-astronomy/wcstools/wcstools-3.8.1-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/wcstools-3.8.1-r1.ebuild,v 1.1 2010/09/10 10:25:59 xarthisius Exp $ + +EAPI=2 +inherit eutils autotools + +DESCRIPTION="World Coordinate System library for astronomical FITS images" +HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools" +SRC_URI="http://tdc-www.harvard.edu/software/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-autotools.patch \ + "${FILESDIR}"/${P}-format.patch \ + "${FILESDIR}"/${P}-implicits.patch \ + "${FILESDIR}"/${P}-invalid_free.patch \ + "${FILESDIR}"/${P}-overflows.patch + + # avoid colliding with fixdos, getdate and remap from other packages + sed -i \ + -e 's/getdate/wcsgetdate/' \ + -e 's/crlf/wcscrlf/' \ + -e 's/remap/wcsremap/' \ + -e "s/3.7.x/${PV}/" \ + wcstools || die + eautoreconf +} + +src_test() { + einfo "Testing various wcstools programs" + ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed" + ./sethead test.fits A=1 B=1 || die "test sethead failed" + [[ "$(./gethead test.fits RA)" == "16:32:00.000" ]] \ + || die "test gethead failed" + rm -f test.fits +} + +src_install() { + emake DESTDIR="${D}" install || die + doman Man/man1/* || die + dodoc Readme Programs NEWS libned/NED_client || die + newdoc libwcs/Readme Readme.libwcs || die + newdoc libwcs/NEWS NEWS.libwcs || die +} + +pkg_postinst() { + elog "The following execs have been renamed to avoid colliding" + elog "with other packages:" + elog " getdate -> wcsgetdate" + elog " crlf -> wcscrlf" + elog " remap -> wcsremap" +} diff --git a/sci-astronomy/wcstools/wcstools-3.8.1.ebuild b/sci-astronomy/wcstools/wcstools-3.8.1.ebuild deleted file mode 100644 index fe1698bf5877..000000000000 --- a/sci-astronomy/wcstools/wcstools-3.8.1.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/wcstools/wcstools-3.8.1.ebuild,v 1.1 2010/01/29 06:51:38 bicatali Exp $ - -EAPI=2 -inherit eutils autotools - -DESCRIPTION="World Coordinate System library for astronomical FITS images" -HOMEPAGE="http://tdc-www.harvard.edu/software/wcstools" -SRC_URI="http://tdc-www.harvard.edu/software/${PN}/${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="" - -src_prepare() { - epatch "${FILESDIR}"/${PN}-3.7-autotools.patch - # avoid colliding with fixdos, getdate and remap from other packages - sed -i \ - -e 's/getdate/wcsgetdate/' \ - -e 's/crlf/wcscrlf/' \ - -e 's/remap/wcsremap/' \ - wcstools Makefile.am || die - sed -i -e "s/3.7.x/${PV}/" "${S}"/configure.ac || die "sed failed" - eautoreconf -} - -src_test() { - einfo "Testing various wcstools programs" - ./newfits -a 10 -j 248 41 -p 0.15 test.fits || die "test newfits failed" - ./sethead test.fits A=1 B=1 || die "test sethead failed" - [[ "$(./gethead test.fits RA)" == "16:32:00.000" ]] \ - || die "test gethead failed" - rm -f test.fits -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - doman Man/man1/* || die "doman failed" - dodoc Readme Programs NEWS libned/NED_client || die "dodoc failed" - newdoc libwcs/Readme Readme.libwcs || die "newdoc failed" - newdoc libwcs/NEWS NEWS.libwcs || die "newdoc failed" -} - -pkg_postinst() { - elog "The following execs have been renamed to avoid colliding" - elog "with other packages:" - elog " getdate -> wcsgetdate" - elog " crlf -> wcscrlf" - elog " remap -> wcsremap" -} -- cgit v1.2.3-65-gdbad