Merge git://github.com/libdivecomputer/libdivecomputer into Subsurface-DS9
Merge updates from Jef's upstream branch. Fix Mares Genius salinity parsing, and a possible buffer overflow in the Liquivision Lynx parser. This also has Jef's copy of Dirk's Shearwater PNF parsing fix that we already had in our tree. * 'master' of git://github.com/libdivecomputer/libdivecomputer: Fix a buffer overflow fix Shearwater PNF parsing for Petrel / Petrel 2 Fix a bug in the salt and fresh water parsing
This commit is contained in:
commit
d52dfb002d
@ -333,7 +333,7 @@ liquivision_lynx_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callba
|
||||
// Get the sample interval.
|
||||
unsigned int interval_idx = data[39];
|
||||
const unsigned int intervals[] = {1, 2, 5, 10, 30, 60};
|
||||
if (interval_idx > C_ARRAY_SIZE(intervals)) {
|
||||
if (interval_idx >= C_ARRAY_SIZE(intervals)) {
|
||||
ERROR (abstract->context, "Invalid sample interval index %u", interval_idx);
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
}
|
||||
|
||||
@ -76,8 +76,8 @@
|
||||
#define GASMIX_INUSE 2
|
||||
#define GASMIX_IGNRD 3
|
||||
|
||||
#define WATER_SALT 0
|
||||
#define WATER_FRESH 1
|
||||
#define WATER_FRESH 0
|
||||
#define WATER_SALT 1
|
||||
#define WATER_EN13319 2
|
||||
|
||||
#define ALARM_NONE 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user