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 Unify float calulations: use double 2017-12-17 09:02:44 -08:00
abstractpreferenceswidget.h Unify float calulations: use double 2017-12-17 09:02:44 -08:00
CMakeLists.txt Cleanup: Rename preferences ui file names according the standard 2018-01-02 09:12:31 -08:00
preferences_defaults.cpp equipment: sanitize 'tank_info' loop limits 2018-06-20 09:30:58 +09:00
preferences_defaults.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
preferences_defaults.ui Restore proper spin-box/slider behavior for animation setting. 2015-11-15 22:22:34 -08:00
preferences_georeference.cpp Cleanup: Rename preferences ui file names according the standard 2018-01-02 09:12:31 -08:00
preferences_georeference.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
preferences_georeference.ui Cleanup: Rename preferences ui file names according the standard 2018-01-02 09:12:31 -08:00
preferences_graph.cpp Dive pictures: automatically recalculate thumbnails 2018-05-27 23:08:12 +03:00
preferences_graph.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
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: support a pre-defined list of date formats 2017-11-10 09:21:47 -08:00
preferences_language.ui Cleanup: Rename preferences ui file names according the standard 2018-01-02 09:12:31 -08:00
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 Remove cloud_background_sync preferences option 2018-01-06 10:46:07 -08:00
preferences_units.cpp Use better aliases for icons. 2017-11-30 23:14:46 -08:00
preferences_units.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
preferences_units.ui Preferences units dialog: Tab order and silence warnings 2017-10-09 11:49:29 +03:00
preferencesdialog.cpp cleanup: less than operators shall not use equal 2017-12-29 13:16:58 -08:00
preferencesdialog.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00