subsurface/desktop-widgets/preferences
Lubomir I. Ivanov 769aca9e95 equipment: sanitize 'tank_info' loop limits
In a number of places the global 'tank_info' array
is being iterated based on a 'tank_info[idx].name != NULL'
condition.

This is dangerous because if the user has added a lot of tanks,
such loops can reach 'tank_info[MAX_TANK_INFO]'. This is an
out of bounds read and if the 'name' pointer there happens to be
non-NULL, passing that address to a peace of code that tries
to read it (like strlen()) would either SIGSEGV or have undefined
behavior.

Clamp all loops that iterate 'tank_info' to MAX_TANK_INFO.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-06-20 09:30:58 +09:00
..
abstractpreferenceswidget.cpp
abstractpreferenceswidget.h
CMakeLists.txt
preferences_defaults.cpp equipment: sanitize 'tank_info' loop limits 2018-06-20 09:30:58 +09:00
preferences_defaults.h
preferences_defaults.ui
preferences_georeference.cpp
preferences_georeference.h
preferences_georeference.ui
preferences_graph.cpp Dive pictures: automatically recalculate thumbnails 2018-05-27 23:08:12 +03:00
preferences_graph.h
preferences_graph.ui Dive pictures: automatically recalculate thumbnails 2018-05-27 23:08:12 +03:00
preferences_language.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
preferences_language.h
preferences_language.ui
preferences_network.cpp Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
preferences_network.h Fix PreferencesNetwork::passwordUpdateSuccessful slot 2018-01-18 08:56:27 +01:00
preferences_network.ui
preferences_units.cpp
preferences_units.h
preferences_units.ui
preferencesdialog.cpp
preferencesdialog.h