[umbrello-devel] New Defects reported by Coverity Scan for Umbrello UML Modeller

scan-admin at coverity.com scan-admin at coverity.com
Fri May 27 22:08:33 UTC 2016


Hi,

Please find the latest report on new defect(s) introduced to Umbrello UML Modeller found with Coverity Scan.

3 new defect(s) introduced to Umbrello UML Modeller found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 161662:  Control flow issues  (MISSING_BREAK)
/home/coverity/src/umbrello/umbrello/listpopupmenu.cpp: 1580 in ListPopupMenu::insertSubMenuNew(ListPopupMenu::MenuType)()


________________________________________________________________________________________________________
*** CID 161662:  Control flow issues  (MISSING_BREAK)
/home/coverity/src/umbrello/umbrello/listpopupmenu.cpp: 1580 in ListPopupMenu::insertSubMenuNew(ListPopupMenu::MenuType)()
1574             case mt_On_EntityRelationship_Diagram:
1575                 insert(mt_Entity, menu, Icon_Utils::SmallIcon(Icon_Utils::it_Entity), i18n("Entity..."));
1576                 insert(mt_Category, menu, Icon_Utils::SmallIcon(Icon_Utils::it_Category), i18n("Category..."));
1577                 break;
1578             case mt_On_Sequence_Diagram:
1579                 insert(mt_Import_from_File, menu, Icon_Utils::SmallIcon(Icon_Utils::it_Import_File), i18n("Import stack trace..."));
>>>     CID 161662:  Control flow issues  (MISSING_BREAK)
>>>     The above case falls through to this one.
1580             case mt_On_Collaboration_Diagram:
1581                 insert(mt_Object, menu, Icon_Utils::SmallIcon(Icon_Utils::it_Object), i18n("Object..."));
1582                 insert(mt_FloatText, menu);
1583                 break;
1584             case mt_Class:
1585                 insert(mt_Attribute, menu, Icon_Utils::SmallIcon(Icon_Utils::it_Public_Attribute), i18n("Attribute"));

** CID 161661:  Null pointer dereferences  (FORWARD_NULL)
/home/coverity/src/umbrello/umbrello/dialogs/umlenumliteraldialog.cpp: 92 in UMLEnumLiteralDialog::apply()()


________________________________________________________________________________________________________
*** CID 161661:  Null pointer dereferences  (FORWARD_NULL)
/home/coverity/src/umbrello/umbrello/dialogs/umlenumliteraldialog.cpp: 92 in UMLEnumLiteralDialog::apply()()
86             KMessageBox::error(this, i18n("You have entered an invalid attribute name."),
87                                i18n("Attribute Name Invalid"), 0);
88             m_pNameLE->setText(m_pEnumLiteral->name());
89             return false;
90         }
91         UMLClassifier * pConcept = dynamic_cast<UMLClassifier *>(m_pEnumLiteral->parent());
>>>     CID 161661:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pConcept" to "findChildObject", which dereferences it. (The dereference happens because this is a virtual function call.)
92         UMLObject *o = pConcept->findChildObject(name);
93         if (o && o != m_pEnumLiteral) {
94             KMessageBox::error(this, i18n("The attribute name you have chosen is already being used in this operation."),
95                                i18n("Attribute Name Not Unique"), 0);
96             m_pNameLE->setText(m_pEnumLiteral->name());
97             return false;

** CID 161660:    (FORWARD_NULL)
/home/coverity/src/umbrello/umbrello/refactoring/refactoringassistant.cpp: 200 in RefactoringAssistant::objectModified()()
/home/coverity/src/umbrello/umbrello/refactoring/refactoringassistant.cpp: 200 in RefactoringAssistant::objectModified()()


________________________________________________________________________________________________________
*** CID 161660:    (FORWARD_NULL)
/home/coverity/src/umbrello/umbrello/refactoring/refactoringassistant.cpp: 200 in RefactoringAssistant::objectModified()()
194      * Slot for updating the tree item properties according to the given UML object.
195      * If no parameter is given the sender is used.
196      * @param obj   the UML object
197      */
198     void RefactoringAssistant::objectModified()
199     {
>>>     CID 161660:    (FORWARD_NULL)
>>>     Assigning: "obj" = "dynamic_cast <UMLObject const *>(this->sender())".
200         const UMLObject *obj = dynamic_cast<const UMLObject*>(sender());
201         QTreeWidgetItem *item = findListViewItem(obj);
202         if (!item) {
203             return;
204         }
205         item->setText(0, obj->name());
/home/coverity/src/umbrello/umbrello/refactoring/refactoringassistant.cpp: 200 in RefactoringAssistant::objectModified()()
194      * Slot for updating the tree item properties according to the given UML object.
195      * If no parameter is given the sender is used.
196      * @param obj   the UML object
197      */
198     void RefactoringAssistant::objectModified()
199     {
>>>     CID 161660:    (FORWARD_NULL)
>>>     Assigning: "obj" = "dynamic_cast <UMLObject const *>(this->sender())".
200         const UMLObject *obj = dynamic_cast<const UMLObject*>(sender());
201         QTreeWidgetItem *item = findListViewItem(obj);
202         if (!item) {
203             return;
204         }
205         item->setText(0, obj->name());


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/umbrello-uml-modeller?tab=overview

To manage Coverity Scan email notifications for "umbrello-devel at kde.org", click https://scan.coverity.com/subscriptions/edit?email=umbrello-devel%40kde.org&token=5fd61726dd9f6c9e1c4e067b821d8371



More information about the umbrello-devel mailing list