Skip to content

code quality errors cleanup

Alexander Kuznetsov requested to merge smithey/kio-extras:errors_cleanup into master

Fixed some errors based on the code quality report.

  1. Critical - Out of bounds access in expression 'm_defaultPassword[i]' because 'm_defaultPassword' is empty and 'i' may be non-zero. (CWE-398) in smb/smbauthenticator.cpp:47

From QT6 code: inline QChar &QString::operator[](qsizetype i) { Q_ASSERT(i >= 0 && i < size()); return data()[i]; }

  1. Major - Member variable 'ArchiveProtocolBase::m_mtime' is not initialized in the constructor. (CWE-398) in archive/kio_archivebase.cpp:36

  2. Major - Function 'makeTimeFromLs' argument order different: declaration 'dayStr, monthStr, timeyearStr' definition 'monthStr, dayStr, timeyearStr' (CWE-683) in fish/fish.cpp:839

  3. Major - Member variable 'Private::controls' is not initialized in the constructor. (CWE-398) in kfileaudiopreview/kfileaudiopreview.cpp:40

  4. Major - Member variable 'RecentDocuments::m_recentDocWatch' is not initialized in the constructor. (CWE-398) in recentdocuments/recentdocuments.cpp:51

  5. Minor - Class 'NextValueIterator < QSqlQuery >' has a constructor with 1 argument that is not explicit. (CWE-398) in activities/utils/qsqlquery_iterator.h:21

  6. Major - 'operator=' should check for assignment to self to avoid problems with dynamic memory. (CWE-398) in nfs/kio_nfs.cpp:482

Edited by Alexander Kuznetsov

Merge request reports