[Kexi-devel] [Differential] [Request, 99 lines] D1276: Fix bugs reported by Coverity Scanhttps://scan.coverity.com/projects/kdb

staniek (Jarosław Staniek) noreply at phabricator.kde.org
Thu Mar 31 17:04:37 UTC 2016


staniek created this revision.
staniek added reviewers: Kexi-Devel-list, piggz.
Herald added a project: KDb.

REVISION SUMMARY
  Fix out-of-bounds read for defaultSQLTypeName(KDbField::LastType+1)
  
  (CID 66289)
  
  Remove structurally dead code
  
  (coverity)
  
  Add missing member initializations
  
  (coverity)
  
  GIT_SILENT Simplify code
  
  Unused member
  
  KDbTableViewColumn: Replace init() with ctor
  
  SQLite dump: Fix sqlite3_snprintf usage and remove one memory leak
  
  (this is fixed in newer SQLite too)
  
  (coverity)
  
  SDC: don't return from constructor on failed conversion from string, otherwise members initialization won't be complete
  
  (coverity)
  
  Fix possible nullptr dereferences
  
  (coverity)
  
  Fix possible division by 0
  
  (coverity)
  
  GIT_SILENT Remove dead code
  
  (coverity)
  
  GIT_SILENT Remove dead code
  
  (coverity)
  
  GIT_SILENT Fix unchecked return value warnings
  
  (coverity)
  
  KDbRecordData: Fix extra sizeof expression
  
  Details:
  "(SIZEOF_MISMATCH)suspicious_pointer_arithmetic: Adding this->m_numCols * 8UL /* sizeof (QVariant *) */ to pointer this->m_data of type QVariant ** is suspicious because adding an integral value to this pointer automatically scales that value by the size, 8 bytes, of the pointed-to type, QVariant *. Most likely, the multiplication by sizeof (QVariant *) in this expression is extraneous and should be eliminated."
  
  (CID 66136)

TEST PLAN
  ctest

REPOSITORY
  rKDB KDb

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D1276

AFFECTED FILES
  src/KDbAlter.cpp
  src/KDbConnection.cpp
  src/KDbCursor.cpp
  src/KDbDriver.cpp
  src/KDbDriverManager.cpp
  src/KDbDriver_p.cpp
  src/KDbFieldList.cpp
  src/KDbIndexSchema.cpp
  src/KDbQuerySchema_p.h
  src/KDbRecordData.h
  src/drivers/postgresql/PostgresqlCursor.cpp
  src/drivers/sqlite/dump/shell.c
  src/views/KDbTableViewColumn.cpp
  src/views/KDbTableViewColumn.h
  src/views/KDbTableViewData.cpp
  tools/sdc.py

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: staniek, Kexi-Devel-list, piggz
Cc: wicik, staniek


More information about the Kexi-devel mailing list