You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
field-cache: zero-initialise cache in shearwater and garmin parser create
dc_parser_allocate() uses malloc, leaving embedded struct members
uninitialised. dc_field_cache_free() is now called from the destroy
path of both parsers before the cache is ever populated; it dereferences
strings[].value, which would be garbage pointers.
Add memset(&parser->cache, 0, sizeof(parser->cache)) in
shearwater_common_parser_create() and garmin_parser_create() immediately
after dc_parser_allocate() succeeds, making all destroy and pre-reset
free calls safe.
Signed-off-by: Subsurface CI <ci@subsurface-divelog.org>
0 commit comments