subsurface/desktop-widgets
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
..
css
plugins Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
preferences equipment: sanitize 'tank_info' loop limits 2018-06-20 09:30:58 +09:00
statistics desktop-widgets/statistics: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
tab-widgets Change from gettextFromC::instance()->tr() to gettextFromC::tr(); 2018-06-18 07:42:39 +02:00
about.cpp
about.h
about.ui
btdeviceselectiondialog.cpp Cleanup: Use QString as parameter for [get|save]BtDeviceInfo() 2018-02-26 08:52:34 +01:00
btdeviceselectiondialog.h
btdeviceselectiondialog.ui
CMakeLists.txt
configuredivecomputerdialog.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
configuredivecomputerdialog.h
configuredivecomputerdialog.ui Configure ostc3: Remove obsoleted setting 2018-04-27 21:33:47 +03:00
divecomponentselection.ui
divecomputermanagementdialog.cpp Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.h Cleanup: fold DiveComputerManagementDialog::update() into init() 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.ui
divelistview.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
divelistview.h Cleanup: make lastUsedDir() functions static and non-slot, respectively 2018-06-09 17:11:29 +02:00
divelogexportdialog.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
divelogexportdialog.h Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
divelogexportdialog.ui
divelogimportdialog.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
divelogimportdialog.h
divelogimportdialog.ui
divepicturewidget.cpp
divepicturewidget.h
diveplanner.cpp Change from gettextFromC::instance()->tr() to gettextFromC::tr(); 2018-06-18 07:42:39 +02:00
diveplanner.h Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
diveplanner.ui Choose water presets from a qcombobox in planner, custom value possible 2018-03-02 08:38:22 -08:00
diveshareexportdialog.cpp Cleanup: Don't clear WA_QuitOnClose attribute on dialogs 2018-06-16 04:02:47 -07:00
diveshareexportdialog.h
diveshareexportdialog.ui
downloadfromdivecomputer.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
downloadfromdivecomputer.h
downloadfromdivecomputer.ui
filterwidget.ui
groupedlineedit.cpp
groupedlineedit.h
kmessagewidget.cpp
kmessagewidget.h
listfilter.ui
locationinformation.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
locationinformation.h
locationInformation.ui Use correct alias for satellite icon for revers geo lookup 2018-01-27 12:29:00 -08:00
mainwindow.cpp Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
mainwindow.h Cleanup: make lastUsedDir() functions static and non-slot, respectively 2018-06-09 17:11:29 +02:00
mainwindow.ui
mapwidget.cpp Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
mapwidget.h
modeldelegates.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
modeldelegates.h Planner: Add combo box for dive mode selection 2018-05-14 23:47:00 +03:00
notificationwidget.cpp Use queued connection to thread-safe MainWindow error handling 2018-01-31 14:47:26 +01:00
notificationwidget.h Use queued connection to thread-safe MainWindow error handling 2018-01-31 14:47:26 +01:00
plannerDetails.ui
plannerSettings.ui
printdialog.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
printdialog.h
printer.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
printer.h
printoptions.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
printoptions.h
printoptions.ui
qtwaitingspinner.cpp
qtwaitingspinner.h
renumber.ui
searchbar.ui
setpoint.ui
shiftimagetimes.ui
shifttimes.ui
simplewidgets.cpp In dive picture shift time dialog suppress double triggering of timeEdit 2018-06-18 15:08:27 +09:00
simplewidgets.h
starwidget.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
starwidget.h
subsurfacewebservices.cpp Cleanup: Don't clear WA_QuitOnClose attribute on dialogs 2018-06-16 04:02:47 -07:00
subsurfacewebservices.h
tableview.cpp
tableview.h
tableview.ui
tagwidget.cpp
tagwidget.h
templateedit.cpp Fix includes for building against Qt-5.11.0 2018-05-23 13:29:37 +03:00
templateedit.h
templateedit.ui
templatelayout.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
templatelayout.h Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
undocommands.cpp Core: introduce new subsurface-string header 2018-05-14 10:13:39 -07:00
undocommands.h Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
updatemanager.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
updatemanager.h
urldialog.ui
usermanual.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
usermanual.h Desktop: Derive UserManual from QDialog 2018-05-31 21:29:29 +03:00
usersurvey.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
usersurvey.h
usersurvey.ui
webservices.ui