Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two new issues since latest refactoring #368

Closed
annejan opened this issue Apr 25, 2018 · 0 comments
Closed

Two new issues since latest refactoring #368

annejan opened this issue Apr 25, 2018 · 0 comments
Assignees
Labels

Comments

@annejan
Copy link
Member

@annejan annejan commented Apr 25, 2018

2 new defect(s) introduced to IJHack/qtpass in #367 found with Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)

** CID 276014: Error handling issues (CHECKED_RETURN)
/src/mainwindow.cpp: 903 in MainWindow::setPassword(QString, bool)()


*** CID 276014: Error handling issues (CHECKED_RETURN)
/src/mainwindow.cpp: 903 in MainWindow::setPassword(QString, bool)()
897 void MainWindow::setPassword(QString file, bool isNew) {
898 PasswordDialog d(QtPassSettings::getPasswordConfiguration(), file, isNew,
899 this);
900 connect(QtPassSettings::getPass(), &Pass::finishedShow, &d,
901 &PasswordDialog::setPass);
902

CID 276014: Error handling issues (CHECKED_RETURN)
Calling "exec" without checking return value (as is done elsewhere 5 out of 6 times).

903 d.exec();
904 }
905
906 /**
907 * @brief MainWindow::on_addButton_clicked add a new password by showing a
908 * number of dialogs.

** CID 276013: Uninitialized members (UNINIT_CTOR)
/src/passworddialog.cpp: 23 in PasswordDialog::PasswordDialog(const PasswordConfiguration &, QWidget *)()


*** CID 276013: Uninitialized members (UNINIT_CTOR)
/src/passworddialog.cpp: 23 in PasswordDialog::PasswordDialog(const PasswordConfiguration &, QWidget *)()
17 m_templating = false;
18 m_allFields = false;
19
20 ui->setupUi(this);
21 setLength(m_passConfig.length);
22 setPasswordCharTemplate(m_passConfig.selected);

CID 276013: Uninitialized members (UNINIT_CTOR)
Non-static class member "m_isNew" is not initialized in this constructor nor in any functions that it calls.

23 }
24
25 /**
26 * @brief PasswordDialog::PasswordDialog complete constructor.
27 * @param passConfig configuration constant
28 * @param file

@annejan annejan added the regression label Apr 25, 2018
@annejan annejan self-assigned this Apr 25, 2018
@annejan annejan closed this in cdc49bf Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.