summaryrefslogtreecommitdiff
blob: 737f6d230dae7092c1fe55b07498bf34980db97a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- 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);