[umbrello] [Bug 340646] Fix issues reported by Coverity scan
Oliver Kellogg
bugzilla_noreply at kde.org
Sat Sep 18 13:54:28 BST 2021
https://bugs.kde.org/show_bug.cgi?id=340646
--- Comment #130 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 50ef037a573f61e612bb3fe7c6a63e691d0c3413 by Oliver Kellogg.
Committed on 18/09/2021 at 12:53.
Pushed by okellogg into branch 'master'.
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.
M +1 -1 umbrello/docgenerators/docbookgeneratorjob.cpp
M +4 -0 umbrello/dotgenerator.cpp
M +0 -4 umbrello/model_utils.cpp
M +18 -4 umbrello/umldoc.cpp
M +7 -1 umbrello/umllistview.cpp
M +1 -0 umbrello/umlwidgets/associationline.cpp
M +2 -2 umbrello/umlwidgets/umlwidget.cpp
M +0 -5 umbrello/umlwidgets/widget_utils.cpp
https://invent.kde.org/sdk/umbrello/commit/50ef037a573f61e612bb3fe7c6a63e691d0c3413
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list