diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c index 9ac25d7..6fb10c2 100644 --- a/src/mares_iconhd.c +++ b/src/mares_iconhd.c @@ -441,7 +441,7 @@ mares_iconhd_extract_dives (device_t *abstract, const unsigned char data[], unsi // equals the calculated length. If both values are different, // something is wrong and an error is returned. unsigned int length = array_uint32_le (buffer + offset); - if (length == 0) + if (length == 0 || length == 0xFFFFFFFF) break; if (length != nbytes) { WARNING ("Calculated and stored size are not equal.");