diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-27 07:03:50 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-27 07:35:46 -0700 |
commit | d6ec20c5412d4120cd93fc5cbf9768478d4bf45b (patch) | |
tree | 4dd49b96ae7ccf9451754b82436c59c8ebc323a6 /desktop-widgets | |
parent | ee6b89268ea5ba83796238514cf3e4ea58460638 (diff) | |
download | subsurface-d6ec20c5412d4120cd93fc5cbf9768478d4bf45b.tar.gz |
Cleanup: avoid out of bounds access
This one is a bit complicated as it depends on a specific flow, but it
seems like setup_cvs_parms might indeed write NULL to the element at
index 49 of parm. I'm not 100% sure that the sequence of events required
for this can happen, but adding one more pointer to the array seems like
cheap insurance.
Found by Coverity. Fixes CID 350120
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelogimportdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index 96058283c..0f08b1ec5 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -916,7 +916,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() QPair<QString, QString> pair = poseidonFileNames(fileNames[i]); parse_txt_file(qPrintable(pair.second), qPrintable(pair.first), &table, &trips, &sites); } else { - char *params[49]; + char *params[50]; int pnr = 0; QRegExp apdRe("^.*[/\\][0-9a-zA-Z]*_([0-9]{6})_([0-9]{6})\\.apd"); |