Skip to content
Commit 50ef037a authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

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

268368, 268398 Division or modulo by float zero in umldoc.cpp
- In function UMLDoc::setResolution require `resolution' to be non null
  before calculating qApp->desktop()->logicalDpiX() / resolution.

268369 Dereference before null check in umlwidgets/enumwidget.cpp
- The issue refers to enumwidget.cpp but the cause is in
  umlwidgets/umlwidget.cpp:
- In function UMLWidget::setSize require m_scene to be non null before
  calling m_scene->snapComponentSizeToGrid().

268372 Out-of-bounds read in umllistview.cpp
- In function UMLListView::determineParentItem,
  - if `object' is null on entry then return null immediately;
  - require `guess' to be unequal to Uml::ModelType::N_MODELTYPES before
    accessing m_lv[guess].

268373 Out-of-bounds read in umldoc.cpp
- In function UMLDoc::findView require `mt' to be unequal to
  Uml::ModelType::N_MODELTYPES before accessing m_root[mt].

268389 Dereference after null check in docgenerators/
                                                docbookgeneratorjob.cpp
- In function xsltprocExternalEntityLoader require
  defaultEntityLoader to be non null before dereferencing as function.

268390, 268400 Structurally dead code in umlwidgets/widget_utils.cpp
- In functions defaultWidgetName, newTitle, newText, renameText remove
  `return QString()' at end of function.

268391 Out-of-bounds read in umldoc.cpp
- In function UMLDoc::loadDiagramsFromXMI1 while-loop handling of `tag'
  "diagram" or "UISDiagram", require `mt' to be unequal to
  Uml::ModelType::N_MODELTYPES before accessing m_root[mt] and calling
  addView(pView).

268394 Structurally dead code in model_utils.cpp
- In functions newTitle, newText, renameTitle, renameText remove
  `return QString()' at end of function.

268395 Missing break in switch in umlwidgets/associationline.cpp
- In function AssociationLine::reconstructSymbols switch statetement, at
  case Uml::AssociationType::Exception add comment
       // fall through
  as suggested in bug 442134 attachment 141364.

268396 Unchecked dynamic_cast in dotgenerator.cpp
- In function DotGenerator::createDotFile loop over scene->widgetList(),
  in nested loop over widget->childItems() require `w2' to be non null
  before dereferencing.

CCBUG: 340646
parent 7a8d1cfb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment