--- 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);