From d395b8b88c2f4ccad65c6a3f176bf1907066c12d Mon Sep 17 00:00:00 2001 From: mdlpstsci Date: Thu, 10 Jun 2021 09:12:36 -0400 Subject: [PATCH] WFC3 aborts when processing IR IMA file with CRCORR=PERFORM (#552) * Fixed the size of a char variable char[9] -> char[12]. Previously, it did not abort, but the variable was too smal for the string it could hold. * Updated the version and added comments to the documentation files with regard to the bug fix - needed to make a char large enough to accommodate its largest possible string or calwf3 would abort. --- pkg/wfc3/calwf3/Dates | 6 ++++++ pkg/wfc3/calwf3/History | 6 ++++++ pkg/wfc3/calwf3/Updates | 6 ++++++ pkg/wfc3/calwf3/include/wf3version.h | 4 ++-- pkg/wfc3/calwf3/wf3ir/groupinfo.c | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pkg/wfc3/calwf3/Dates b/pkg/wfc3/calwf3/Dates index 6a3aece3a..475111f28 100644 --- a/pkg/wfc3/calwf3/Dates +++ b/pkg/wfc3/calwf3/Dates @@ -1,3 +1,9 @@ +27-May-2021 - MDD - Version 3.6.2 + - Bug fix to address calwf3.e crashing (Abort trap: 6) when taking an existing *_ima.fits (IR) file + (produced with FLATCORR=PERFORM and CRCORR=OMIT) with CRCORR set to PERFORM. This reentrant + processing is fundamental to being able to remove the variable IR background during the course + of an exposure. Problem: char variable declared too small to hold its largest possible contents. + 28-Apr-2021 - MDD - Version 3.6.1 - Bug fix to address a problem detected when processing a Tungsten flat with a high background. Uninitialized values were used for further computation causing an eventual exception. diff --git a/pkg/wfc3/calwf3/History b/pkg/wfc3/calwf3/History index 220c7a4a9..ddb68fed7 100644 --- a/pkg/wfc3/calwf3/History +++ b/pkg/wfc3/calwf3/History @@ -1,3 +1,9 @@ +### 27-May-2021 - MDD - Version 3.6.2 + - Bug fix to address calwf3.e crashing (Abort trap: 6) when taking an existing *_ima.fits (IR) file + (produced with FLATCORR=PERFORM and CRCORR=OMIT) with CRCORR set to PERFORM. This reentrant + processing is fundamental to being able to remove the variable IR background during the course + of an exposure. Problem: char variable declared too small to hold its largest possible contents. + ### 28-Apr-2021 - MDD - Version 3.6.1 - Bug fix to address a problem detected when processing a Tungsten flat with a high background. Uninitialized values were used for further computation causing an eventual exception. diff --git a/pkg/wfc3/calwf3/Updates b/pkg/wfc3/calwf3/Updates index 4076dfa36..ba57f8615 100644 --- a/pkg/wfc3/calwf3/Updates +++ b/pkg/wfc3/calwf3/Updates @@ -1,3 +1,9 @@ +Updates for Version 3.6.2 27-May-2021 - MDD + - Bug fix to address calwf3.e crashing (Abort trap: 6) when taking an existing *_ima.fits (IR) file + (produced with FLATCORR=PERFORM and CRCORR=OMIT) with CRCORR set to PERFORM. This reentrant + processing is fundamental to being able to remove the variable IR background during the course + of an exposure. Problem: char variable declared too small to hold its largest possible contents. + Updates for Version 3.6.1 28-Apr-2021 - MDD - Bug fix to address a problem detected when processing a Tungsten flat with a high background. Uninitialized values were used for further computation causing an eventual exception. diff --git a/pkg/wfc3/calwf3/include/wf3version.h b/pkg/wfc3/calwf3/include/wf3version.h index fc405e5cd..f9da1db0d 100644 --- a/pkg/wfc3/calwf3/include/wf3version.h +++ b/pkg/wfc3/calwf3/include/wf3version.h @@ -4,7 +4,7 @@ /* This string is written to the output primary header as CAL_VER. */ -# define WF3_CAL_VER "3.6.1(Apr-28-2021)" -# define WF3_CAL_VER_NUM "3.6.1" +# define WF3_CAL_VER "3.6.2 (May-27-2021)" +# define WF3_CAL_VER_NUM "3.6.2" #endif /* INCL_WF3VERSION_H */ diff --git a/pkg/wfc3/calwf3/wf3ir/groupinfo.c b/pkg/wfc3/calwf3/wf3ir/groupinfo.c index e0da3f081..bd83f0ff5 100644 --- a/pkg/wfc3/calwf3/wf3ir/groupinfo.c +++ b/pkg/wfc3/calwf3/wf3ir/groupinfo.c @@ -97,7 +97,7 @@ int getDataUnits (WF3Info *wf3, Hdr *header) { */ /* Local variables */ - char units[9]; /* BUNIT keyword value */ + char units[12]; /* BUNIT keyword value */ /* Read the BUNIT keyword */ units[0] = '\0';