Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.8
-
78eac57f3d (qt/qtbase/dev) 78eac57f3d (qt/tqtc-qtbase/dev) 7042c1c5f8 (qt/qtbase/6.2) 7042c1c5f8 (qt/tqtc-qtbase/6.2) ba926780d1 (qt/qtbase/6.3) ba926780d1 (qt/tqtc-qtbase/6.3) ee386d9265 (qt/tqtc-qtbase/5.15) ba926780d1 (qt/tqtc-qtbase/6.3.0)
Description
QSqlQuery crashes if exec is called after the database connection is down. Looks like the QSqlQuery::driver() value ends up as nullptr but the checks for it are missing in the exec function.
Steps to reproduce the crash:
- Run the attached example
Attachments
For Gerrit Dashboard: QTBUG-100037 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
391692,5 | Check for null driver() before trying to exec() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
392090,4 | Check for null driver() before trying to exec() | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
392091,3 | Check for null driver() before trying to exec() | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
392092,2 | Check for null driver() before trying to exec() | 5.12 | qt/qtbase | Status: ABANDONED | 0 | 0 |
392094,4 | Check for null driver() before trying to exec() | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |