mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ee6b89268e
commit
d6ec20c541
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue