Commit 0bd3938b authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed buffer overflow issue.

parent 91bcc4c0
...@@ -81,7 +81,7 @@ language = None ...@@ -81,7 +81,7 @@ language = None
# There are two options for replacing |today|: either, you set today to some # There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: # non-false value, then it is used:
# #
today = 'Tue Sep 06 2022' today = 'Wed Sep 07 2022'
# #
# Else, today_fmt is used as the format for a strftime call. # Else, today_fmt is used as the format for a strftime call.
# #
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 12/07/2012 * Last modified: 07/09/2022
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -49,7 +49,7 @@ INPUT Name of the ASCII file, ...@@ -49,7 +49,7 @@ INPUT Name of the ASCII file,
OUTPUT RETURN_OK if the file was found, RETURN_ERROR otherwise. OUTPUT RETURN_OK if the file was found, RETURN_ERROR otherwise.
NOTES -. NOTES -.
AUTHOR E. Bertin (IAP) AUTHOR E. Bertin (IAP)
VERSION 12/07/2012 VERSION 07/09/2022
***/ ***/
int read_aschead(char *filename, int frameno, tabstruct *tab) int read_aschead(char *filename, int frameno, tabstruct *tab)
{ {
...@@ -63,7 +63,7 @@ int read_aschead(char *filename, int frameno, tabstruct *tab) ...@@ -63,7 +63,7 @@ int read_aschead(char *filename, int frameno, tabstruct *tab)
{ {
/*- Skip previous ENDs in multi-FITS extension headers */ /*- Skip previous ENDs in multi-FITS extension headers */
for (i=frameno-1; i--;) for (i=frameno-1; i--;)
while (fgets(str, MAXCHAR, file) while (fgets(str, 88, file)
&& strncmp(str,"END ",4) && strncmp(str,"END ",4)
&& strncmp(str,"END\n",4)); && strncmp(str,"END\n",4));
memset(str, ' ', 80); memset(str, ' ', 80);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment