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

Oliver Kellogg bugzilla_noreply at kde.org
Sat Nov 20 15:24:40 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=340646

--- Comment #133 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 788fcb8b4f830ca617a4296442ac22c8c057f737 by Oliver Kellogg.
Committed on 20/11/2021 at 15:23.
Pushed by okellogg into branch 'master'.

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

268381 Use after free in umlwidgets/diagramproxywidget.cpp
- In function slotMenuSelection case ListPopupMenu::mt_State_Diagram,
  if `ok` is true after the do-while loop then
  - assign d->view()->umlScene() to local variable `scene` before call
    to UMLApp::app()->executeCommand(d);
  - at calls to setDiagramLink and setWidgetLink use local `scene` in
    lieu of d->view()->umlScene().
    Reason: `d` may have been invalidated by the executeCommand call.

364153 Uninitialized scalar variable in dialogs/pages/
                                                selectoperationpage.cpp
- In copy constructor initialize m_enableAutoIncrement to false.
- In function slotAutoIncrementChecked assign `state` to
  m_enableAutoIncrement.
- As a related fix, in dialogs/selectoperationdialog.cpp function
  slotAutoIncrementChecked assign `state` to m_enableAutoIncrement.

364158 Resource leak in docgenerators/docbookgeneratorjob.cpp
- In function xsltprocExternalEntityLoader split the statement
        if (newURL != NULL && defaultEntityLoader != NULL) {
  into two statements
        if (newURL != NULL) {
            if (defaultEntityLoader != NULL) {
  such that xmlFree(newURL) is called regardless of the second
  condition.

Thanks to Ralf H. for updating https://github.com/rhabacker/umbrello

M  +4    -2    umbrello/dialogs/pages/selectoperationpage.cpp
M  +2    -1    umbrello/dialogs/selectoperationdialog.cpp
M  +11   -9    umbrello/docgenerators/docbookgeneratorjob.cpp
M  +4    -3    umbrello/umlwidgets/diagramproxywidget.cpp

https://invent.kde.org/sdk/umbrello/commit/788fcb8b4f830ca617a4296442ac22c8c057f737

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list