Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9
-
None
-
7bfe093ae5a904c375ae7b2635e681ff319c80af
Description
New defect(s) Reported-by: Coverity Scan Showing 2 of 2 defect(s) ** CID 21591: Error handling issues (CHECKED_RETURN) /qttools/src/designer/src/designer/qdesigner_server.cpp: 50 in QDesignerServer::QDesignerServer(QObject *)() ________________________________________________________________________________________________________ *** CID 21591: Error handling issues (CHECKED_RETURN) /qttools/src/designer/src/designer/qdesigner_server.cpp: 50 in QDesignerServer::QDesignerServer(QObject *)() 44 45 QDesignerServer::QDesignerServer(QObject *parent) 46 : QObject(parent) 47 { 48 m_socket = 0; 49 m_server = new QTcpServer(this); >>> CID 21591: Error handling issues (CHECKED_RETURN) >>> Calling "listen" without checking return value (as is done elsewhere 4 out of 5 times). 50 m_server->listen(QHostAddress::LocalHost, 0); 51 if (m_server->isListening()) 52 { 53 connect(m_server, &QTcpServer::newConnection, 54 this, &QDesignerServer::handleNewConnection); 55 } ** CID 176868: Memory - illegal accesses (USE_AFTER_FREE) /qtbase/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp: 583 in _q_regexp(sqlite3_context *, int, Mem **)() ________________________________________________________________________________________________________ *** CID 176868: Memory - illegal accesses (USE_AFTER_FREE) /qtbase/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp: 583 in _q_regexp(sqlite3_context *, int, Mem **)() 577 QRegularExpression *regexp = cache->object(pattern); 578 if (!regexp) { 579 regexp = new QRegularExpression(pattern, QRegularExpression::DontCaptureOption 580 | QRegularExpression::OptimizeOnFirstUsageOption); 581 cache->insert(pattern, regexp); 582 } >>> CID 176868: Memory - illegal accesses (USE_AFTER_FREE) >>> Passing freed pointer "regexp" as an argument to "contains". 583 const bool found = subject.contains(*regexp); 584 585 sqlite3_result_int(context, int(found)); 586 } 587 588 static void _q_regexp_cleanup(void *cache)