summaryrefslogtreecommitdiffstats
path: root/src/file_fits.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_fits.c')
-rw-r--r--src/file_fits.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_fits.c b/src/file_fits.c
index a82e438..606772f 100644
--- a/src/file_fits.c
+++ b/src/file_fits.c
@@ -71,7 +71,7 @@ static uint64_t fits_info(const unsigned char *buffer, const unsigned int buffer
uint64_t naxis_size=1;
unsigned int i=*i_pointer;
/* Header is composed of 80 character fixed-length strings */
- for(; i<buffer_size &&
+ for(; i+80 < buffer_size &&
memcmp(&buffer[i], "END ", 4)!=0;
i+=80)
{