[SCM] Tcl interface to FITS Files branch, debian, updated. fca47036be6d2253d385af88166de623c7f31a62
Ole Streicher
debian at liska.ath.cx
Wed Aug 22 15:55:14 UTC 2012
The following commit has been merged in the debian branch:
commit dc388cb229f7f7c096039829188716a70f96d991
Author: Ole Streicher <debian at liska.ath.cx>
Date: Wed Aug 22 17:44:30 2012 +0200
Check argc in "get translatedKeywords" to avoid a segfault
diff --git a/debian/patches/fix_free.patch b/debian/patches/fix_free.patch
index 854f0c4..8fc9eda 100644
--- a/debian/patches/fix_free.patch
+++ b/debian/patches/fix_free.patch
@@ -33,7 +33,21 @@ Description: In fitsTcl_get(), the header is allocated by ffhdr2str(), but is
return TCL_OK;
} else if( !strcmp("translatedKeywords", argv[2]) ) {
-@@ -1075,13 +1075,14 @@
+@@ -1058,6 +1058,13 @@
+ long rownum;
+ fitsfile *newptr;
+
++ if ( argc != 5 ) {
++ Tcl_SetResult(curFile->interp,
++ "Usage: get translatedKeywords rownum colname",
++ TCL_STATIC);
++ return TCL_ERROR;
++ }
++
+ strcpy(outfile, "mem://_1");
+
+ /* Copy the image into new primary array and open it as the current */
+@@ -1075,13 +1082,14 @@
status = 0;
if (fits_copy_cell2image(curFile->fptr, newptr, argv[3], rownum, &status) > 0)
{
@@ -50,7 +64,7 @@ Description: In fitsTcl_get(), the header is allocated by ffhdr2str(), but is
Tcl_SetResult(curFile->interp, "Failed to collect all the headers.", TCL_STATIC);
return TCL_ERROR;
}
-@@ -1102,7 +1103,7 @@
+@@ -1102,7 +1110,7 @@
Tcl_SetObjResult(curFile->interp, listObj);
*/
@@ -59,7 +73,7 @@ Description: In fitsTcl_get(), the header is allocated by ffhdr2str(), but is
return TCL_OK;
} else if( !strcmp("header2str", argv[2]) ) {
-@@ -1114,7 +1115,7 @@
+@@ -1114,7 +1122,7 @@
/* int *nkeys, O - returned number of 80-char keywords */
/* int *status) IO - error status */
@@ -68,7 +82,7 @@ Description: In fitsTcl_get(), the header is allocated by ffhdr2str(), but is
Tcl_SetResult(curFile->interp, "Failed to collect all the headers.", TCL_STATIC);
return TCL_ERROR;
}
-@@ -1123,7 +1124,7 @@
+@@ -1123,7 +1131,7 @@
Tcl_ListObjAppendElement( curFile->interp, listObj, Tcl_NewIntObj( nkeys ) );
Tcl_SetObjResult(curFile->interp, listObj);
--
Tcl interface to FITS Files
More information about the debian-science-commits
mailing list