[umbrello] [Bug 340646] Fix issues reported by Coverity scan

"Oliver Kellogg" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=340646

--- Comment #134 from Oliver Kellogg <[email protected]> ---
Git commit ff074f9b07a79d71f8456646da20535dd619e3fd by Oliver Kellogg.
Committed on 06/12/2021 at 19:26.
Pushed by okellogg into branch 'master'.

https://scan.coverity.com/projects/3327 Coverity fixes listed by CID :

178695 Unchecked return value in umldoc.cpp
- In function loadUMLObjectsFromXMI1 loop over QDomNode, on handling
  type "Model", in nested for-loop of i over Uml::ModelType, if name is
  m_root[i]->name() then
  - define local UMLFolder *curRootSave saving m_pCurrentRoot;
  - if return value from loadFromXMI1(tempElement) is false then restore
    m_pCurrentRoot from curRootSave and return false.

268392 Logically dead code in diagram_utils.cpp
- In function importGraph loop over lines handling of associations, if
  after handling of swapObjects `error' is set then `assoc' is
  guaranteed to be null; ergo remove the if-statement testing assoc.

364156 Uninitialized pointer field in codeimport/phpimport.cpp
- In PHPIncludeFileVisitor constructor initialize members m_indent and
  m_dependencies.

364157 Dereference after null check in umllistview.cpp
- In functtion loadChildrenFromXMI switch (lvType) case
  UMLListViewItem::lvt_Attribute et al. with findItem(nID) returning
  null, in the code handling (lvType == lvt_InstanceAttribute) with
  umlObject->asUMLInstance() returning non null do not reassign to the
  existing variable umlObject. Instead, define local UMLObject* attrObj
  receiving the result from instance->findChildObjectById(nID).

364159 Uninitialized pointer field in codeimport/phpimport.cpp
- In class DebugLanguageParserHelper constructor, initialize member
  m_ast to null.
- Additional cosmetic changes in class DebugLanguageParserHelper:
  - Rename function setFeeded to setFed.
  - Rename function isFeeded to wasFed.

M  +8    -5    umbrello/codeimport/phpimport.cpp
M  +1    -2    umbrello/diagram_utils.cpp
M  +6    -1    umbrello/umldoc.cpp
M  +3    -3    umbrello/umllistview.cpp

https://invent.kde.org/sdk/umbrello/commit/ff074f9b07a79d71f8456646da20535dd619e3fd

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.