Bug 340646 - Fix issues reported by Coverity scan
Summary: Fix issues reported by Coverity scan
Status: REPORTED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR task
Target Milestone: ---
Assignee: Umbrello Development Group
URL: http://scan.coverity.com/projects/3327
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-11-04 20:10 UTC by Oliver Kellogg
Modified: 2021-12-06 19:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2014-11-04 20:10:58 UTC
Recently, Umbrello was accepted to Coverity's open source project scans:
https://scan.coverity.com/projects/3327
Currently, the basis for the scan is git master revision bd16929 of 2014-10-15.
This ticket is intended for funneling efforts to fix the issues reported.
Comment 1 Oliver Kellogg 2014-11-30 19:07:14 UTC
Git commit 9324cf30e4017d0f37a95d47da96882a8d713199 by Oliver Kellogg.
Committed on 30/11/2014 at 19:06.
Pushed by okellogg into branch 'master'.

Coverity check on master@375ea16 CIDs 83526, 83527, 83528, 83529, 83530 :
Logically dead code in file unittests/TEST_basictypes.cpp

- CID 83526: At function test_Corner_toString_fromString() for-loop,
  - use "<=" as comparison operator for staying in loop;
  - replace ++i by i *= 2 on iteration action. Reason: The values of
    the Corner enum are represented as 0x1, 0x2, 0x4, 0x8.

- CID 83527: At function test_RoleType_toString_fromString() for-loop,
  use "<=" as comparison operator for staying in loop.

- CID 83528: At function test_RoleType_toString_fromString() for-loop,
  use "<=" as comparison operator for staying in loop.

- CID 83529: At function test_Region_toString_fromString() for-loop,
  use "<=" as comparison operator for staying in loop.

- CID 83530: At function test_ProgrammingLanguage_toString_fromString()
  for-loop, use "<=" as comparison operator for staying in loop.

M  +5    -5    unittests/TEST_basictypes.cpp

http://commits.kde.org/umbrello/9324cf30e4017d0f37a95d47da96882a8d713199
Comment 2 Ralf Habacker 2014-12-01 04:44:33 UTC
Git commit d974b7832136ef1a6f881dad413889c180d6f903 by Ralf Habacker.
Committed on 30/11/2014 at 13:56.
Pushed by habacker into branch 'master'.

Coverity check on master@bd16929, CID 71394: Unchecked dynamic_cast (FORWARD_NULL).

M  +4    -0    umbrello/codegenerators/codeclassfield.cpp

http://commits.kde.org/umbrello/d974b7832136ef1a6f881dad413889c180d6f903
Comment 3 Ralf Habacker 2014-12-01 04:44:33 UTC
Git commit 55872c008f8dc0653edd7154f97a15c6efc4c7ab by Ralf Habacker.
Committed on 28/11/2014 at 22:26.
Pushed by habacker into branch 'master'.

Coverity check on master@bd16929, CID 71422: Unchecked dynamic_cast (FORWARD_NULL).

M  +4    -0    umbrello/classifiercodedocument.cpp

http://commits.kde.org/umbrello/55872c008f8dc0653edd7154f97a15c6efc4c7ab
Comment 4 Ralf Habacker 2014-12-02 16:48:22 UTC
Git commit ee1a631fcfedb56aeb11fec1f722230ff0760cea by Ralf Habacker, on behalf of Oliver Kellogg.
Committed on 30/11/2014 at 19:06.
Pushed by habacker into branch 'Applications/14.12'.

Coverity check on master@375ea16 CIDs 83526, 83527, 83528, 83529, 83530 :
Logically dead code in file unittests/TEST_basictypes.cpp

- CID 83526: At function test_Corner_toString_fromString() for-loop,
  - use "<=" as comparison operator for staying in loop;
  - replace ++i by i *= 2 on iteration action. Reason: The values of
    the Corner enum are represented as 0x1, 0x2, 0x4, 0x8.

- CID 83527: At function test_RoleType_toString_fromString() for-loop,
  use "<=" as comparison operator for staying in loop.

- CID 83528: At function test_RoleType_toString_fromString() for-loop,
  use "<=" as comparison operator for staying in loop.

- CID 83529: At function test_Region_toString_fromString() for-loop,
  use "<=" as comparison operator for staying in loop.

- CID 83530: At function test_ProgrammingLanguage_toString_fromString()
  for-loop, use "<=" as comparison operator for staying in loop.

M  +5    -5    unittests/TEST_basictypes.cpp

http://commits.kde.org/umbrello/ee1a631fcfedb56aeb11fec1f722230ff0760cea
Comment 5 Ralf Habacker 2014-12-02 16:48:23 UTC
Git commit 2399b5734b99ee7f7274cfdb17608449243a84f1 by Ralf Habacker.
Committed on 28/11/2014 at 22:23.
Pushed by habacker into branch 'Applications/14.12'.

Coverity check on master@bd16929, CID 71414: Dereference after null check (FORWARD_NULL).

M  +1    -0    umbrello/classifiercodedocument.cpp

http://commits.kde.org/umbrello/2399b5734b99ee7f7274cfdb17608449243a84f1
Comment 6 Ralf Habacker 2014-12-02 16:48:24 UTC
Git commit ac40f6094ad3b58a28e9637fdb609508a6811af1 by Ralf Habacker.
Committed on 28/11/2014 at 22:26.
Pushed by habacker into branch 'Applications/14.12'.

Coverity check on master@bd16929, CID 71422: Unchecked dynamic_cast (FORWARD_NULL).

M  +4    -0    umbrello/classifiercodedocument.cpp

http://commits.kde.org/umbrello/ac40f6094ad3b58a28e9637fdb609508a6811af1
Comment 7 Ralf Habacker 2014-12-02 16:48:54 UTC
Git commit 554d9e434895a9f87ee988709cdf8aa956ea5d6c by Ralf Habacker.
Committed on 30/11/2014 at 14:02.
Pushed by habacker into branch 'Applications/14.12'.

Coverity check on master@bd16929, CID 71462: Unchecked dynamic_cast (FORWARD_NULL).

M  +4    -0    umbrello/codegenerators/codeclassfield.cpp

http://commits.kde.org/umbrello/554d9e434895a9f87ee988709cdf8aa956ea5d6c
Comment 8 Ralf Habacker 2014-12-02 16:48:54 UTC
Git commit 3d110b3048c6320bf1fe5484fecf75b2e317e0f9 by Ralf Habacker.
Committed on 30/11/2014 at 13:56.
Pushed by habacker into branch 'Applications/14.12'.

Coverity check on master@bd16929, CID 71394: Unchecked dynamic_cast (FORWARD_NULL).

M  +4    -0    umbrello/codegenerators/codeclassfield.cpp

http://commits.kde.org/umbrello/3d110b3048c6320bf1fe5484fecf75b2e317e0f9
Comment 9 Ralf Habacker 2014-12-05 07:33:23 UTC
Git commit 080be24977873d6901ef70bfbe3c4e84eb01b370 by Ralf Habacker.
Committed on 05/12/2014 at 07:28.
Pushed by habacker into branch 'master'.

Coverity check on master@bd16929, CID 71489: Uninitialized pointer field (UNINIT_CTOR).

DialogBase class member m_fontChooser, m_pStylePage and m_pageItem has not been
initialised in the constructor. Also prevent zero pointer access to m_fontChooser
and m_pStylePage caused by code design issues. Remove obsolate, not initialised
m_pStylePage class members in derived classes.

M  +0    -1    umbrello/dialogs/associationpropertiesdialog.h
M  +0    -1    umbrello/dialogs/classpropertiesdialog.cpp
M  +0    -1    umbrello/dialogs/classpropertiesdialog.h
M  +6    -1    umbrello/dialogs/dialogbase.cpp
M  +0    -1    umbrello/dialogs/umlviewdialog.h

http://commits.kde.org/umbrello/080be24977873d6901ef70bfbe3c4e84eb01b370
Comment 10 Ralf Habacker 2014-12-09 06:00:18 UTC
Git commit 48f3c49d3a5f39d8cf49bdcf0dc6856ab52872ca by Ralf Habacker.
Committed on 05/12/2014 at 07:28.
Pushed by habacker into branch 'work/73847'.

Coverity check on master@bd16929, CID 71489: Uninitialized pointer field (UNINIT_CTOR).

DialogBase class member m_fontChooser, m_pStylePage and m_pageItem has not been
initialised in the constructor. Also prevent zero pointer access to m_fontChooser
and m_pStylePage caused by code design issues. Remove obsolate, not initialised
m_pStylePage class members in derived classes.

M  +0    -1    umbrello/dialogs/associationpropertiesdialog.h
M  +0    -1    umbrello/dialogs/classpropertiesdialog.cpp
M  +0    -1    umbrello/dialogs/classpropertiesdialog.h
M  +6    -1    umbrello/dialogs/dialogbase.cpp
M  +0    -1    umbrello/dialogs/umlviewdialog.h

http://commits.kde.org/umbrello/48f3c49d3a5f39d8cf49bdcf0dc6856ab52872ca
Comment 11 Andi Fischer 2014-12-11 21:56:44 UTC
Git commit f134ebf855c1a27d64021a6c3d45e90e1e341add by Andi Fischer, on behalf of Ralf Habacker.
Committed on 05/12/2014 at 07:28.
Pushed by fischer into branch 'frameworks'.

Coverity check on master@bd16929, CID 71489: Uninitialized pointer field (UNINIT_CTOR).

DialogBase class member m_fontChooser, m_pStylePage and m_pageItem has not been
initialised in the constructor. Also prevent zero pointer access to m_fontChooser
and m_pStylePage caused by code design issues. Remove obsolate, not initialised
m_pStylePage class members in derived classes.

M  +0    -1    umbrello/dialogs/classpropertiesdialog.h
M  +6    -1    umbrello/dialogs/dialogbase.cpp
M  +0    -1    umbrello/dialogs/umlviewdialog.h

http://commits.kde.org/umbrello/f134ebf855c1a27d64021a6c3d45e90e1e341add
Comment 12 Oliver Kellogg 2015-03-28 08:38:30 UTC
cov-build of master@e2a24e0 (2015-03-25) has been submitted and should appear shortly at
https://scan.coverity.com/projects/3327
Comment 13 Ralf Habacker 2015-03-28 08:43:47 UTC
(In reply to Oliver Kellogg from comment #12)
> cov-build of master@e2a24e0 (2015-03-25) has been submitted and should
> appear shortly at
> https://scan.coverity.com/projects/3327
    135 
Newly detected

This scan contains newly generated moc files, which should be excluded.
Comment 14 Oliver Kellogg 2015-03-28 10:28:05 UTC
(In reply to Ralf Habacker from comment #13)
>     135 Newly detected
> 
> This scan contains newly generated moc files, which should be excluded.

Thanks for noticing. I will try adding
  <skip_file>\.moc$</skip_file>
after <begin_command_line_config> in coverity_config.xml on the next cov-build.
Comment 15 Ralf Habacker 2015-03-28 10:33:03 UTC
(In reply to Oliver Kellogg from comment #14)
> (In reply to Ralf Habacker from comment #13)
> >     135 Newly detected
> > 
> > This scan contains newly generated moc files, which should be excluded.
> 
> Thanks for noticing. I will try adding
>   <skip_file>\.moc$</skip_file>
> after <begin_command_line_config> in coverity_config.xml on the next
> cov-build.

Will recently added moc file then be removed from the scan report ? If not how should we classify them: 
Intentional or false positive.
Comment 16 Ralf Habacker 2015-03-29 11:17:07 UTC
Git commit 47c9151e07bc0eef5138b67412ac9bedfbaceaa7 by Ralf Habacker.
Committed on 29/03/2015 at 11:11.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88456: Resource leak (RESOURCE_LEAK)

M  +2    -0    unittests/TEST_basictypes.cpp

http://commits.kde.org/umbrello/47c9151e07bc0eef5138b67412ac9bedfbaceaa7
Comment 17 Ralf Habacker 2015-03-29 12:14:58 UTC
Git commit 5828693ea72108b645ce03119ceea3a448aed333 by Ralf Habacker.
Committed on 29/03/2015 at 12:12.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88443: Resource leak (RESOURCE_LEAK)

The class TextBlockInfo instance tbinfo cannot be zero.

M  +1    -3    umbrello/dialogs/codeeditor.cpp

http://commits.kde.org/umbrello/5828693ea72108b645ce03119ceea3a448aed333
Comment 18 Ralf Habacker 2015-04-01 16:45:23 UTC
Git commit ed0282af39daa3ac700690aa6427df02dafccc81 by Ralf Habacker.
Committed on 01/04/2015 at 16:44.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88341: Unintended comparison to logical negation (BAD_COMPARE).

M  +1    -1    tools/shared.cpp

http://commits.kde.org/umbrello/ed0282af39daa3ac700690aa6427df02dafccc81
Comment 19 Ralf Habacker 2015-04-01 17:19:51 UTC
Git commit b4668f387c28cb9beb2b96da87e79eb8d8603e93 by Ralf Habacker.
Committed on 01/04/2015 at 17:02.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71505: Result is not floating-point (UNINTENDED_INTEGER_DIVISION).

M  +2    -2    umbrello/widgets/statewidget.cpp

http://commits.kde.org/umbrello/b4668f387c28cb9beb2b96da87e79eb8d8603e93
Comment 20 Ralf Habacker 2015-04-01 17:41:17 UTC
Git commit af7b07b27ac3fba828c865831fff09bf392ecf58 by Ralf Habacker.
Committed on 01/04/2015 at 17:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71402: Dereference after null check (FORWARD_NULL).

M  +2    -0    umbrello/codeimport/kdevcppparser/cpptree2uml.cpp

http://commits.kde.org/umbrello/af7b07b27ac3fba828c865831fff09bf392ecf58
Comment 21 Ralf Habacker 2015-04-01 19:24:49 UTC
Git commit 44ca5100743a944d690484bb996469cad09844a6 by Ralf Habacker.
Committed on 01/04/2015 at 18:40.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71400: Unchecked dynamic_cast (FORWARD_NULL).

M  +1    -0    umbrello/classifier.cpp

http://commits.kde.org/umbrello/44ca5100743a944d690484bb996469cad09844a6
Comment 22 Ralf Habacker 2015-04-01 19:24:49 UTC
Git commit a5fbbe99e6b502a4bd7d37dbc800b0e0ea183f82 by Ralf Habacker.
Committed on 01/04/2015 at 18:54.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71463: Unchecked dynamic_cast (FORWARD_NULL).

M  +1    -0    umbrello/entity.cpp
M  +1    -0    umbrello/enum.cpp

http://commits.kde.org/umbrello/a5fbbe99e6b502a4bd7d37dbc800b0e0ea183f82
Comment 23 Ralf Habacker 2015-04-01 19:24:50 UTC
Git commit f054f3daed6cf1f9d7becf3d0f7084c4461ed316 by Ralf Habacker.
Committed on 01/04/2015 at 18:54.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71466: Unchecked dynamic_cast (FORWARD_NULL).

M  +2    -1    umbrello/codegenerators/codeclassfield.cpp

http://commits.kde.org/umbrello/f054f3daed6cf1f9d7becf3d0f7084c4461ed316
Comment 24 Ralf Habacker 2015-04-02 17:45:30 UTC
Git commit e73c43f86e8a9dfa6f3d891869f974b6596763e7 by Ralf Habacker.
Committed on 02/04/2015 at 16:53.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88475: Uninitialized scalar field (UNINIT_CTOR).

M  +4    -1    umbrello/dialogs/selectoperationdialog.cpp

http://commits.kde.org/umbrello/e73c43f86e8a9dfa6f3d891869f974b6596763e7
Comment 25 Ralf Habacker 2015-04-02 17:45:31 UTC
Git commit c118429b2e1448c1e672ea673bd0d7a6a853daa3 by Ralf Habacker.
Committed on 02/04/2015 at 17:02.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88472: Uninitialized scalar field (UNINIT_CTOR).

M  +5    -1    umbrello/dialogs/codeeditor.h

http://commits.kde.org/umbrello/c118429b2e1448c1e672ea673bd0d7a6a853daa3
Comment 26 Ralf Habacker 2015-04-02 17:45:32 UTC
Git commit 850ee61fd87b833e2a037755c1bc62c9f4691325 by Ralf Habacker.
Committed on 02/04/2015 at 17:08.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71524: Uninitialized scalar field (UNINIT_CTOR).

M  +7    -1    lib/cppparser/driver.cpp

http://commits.kde.org/umbrello/850ee61fd87b833e2a037755c1bc62c9f4691325
Comment 27 Ralf Habacker 2015-04-02 17:45:32 UTC
Git commit c174f51aa6871b0a82afbc65516d9534628e8ccc by Ralf Habacker.
Committed on 02/04/2015 at 17:40.
Pushed by habacker into branch 'Applications/15.04'.

Fix missing m_ prefix of class members MessageWidget::xclicked and  MessageWidget::yclicked.

M  +13   -13   umbrello/widgets/messagewidget.cpp
M  +3    -3    umbrello/widgets/messagewidget.h

http://commits.kde.org/umbrello/c174f51aa6871b0a82afbc65516d9534628e8ccc
Comment 28 Ralf Habacker 2015-04-02 17:45:33 UTC
Git commit a748daa2df5052282b84eb11ccb784b95b471e6c by Ralf Habacker.
Committed on 02/04/2015 at 17:40.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71522: Uninitialized scalar field (UNINIT_CTOR).

M  +2    -0    umbrello/widgets/messagewidget.cpp

http://commits.kde.org/umbrello/a748daa2df5052282b84eb11ccb784b95b471e6c
Comment 29 Ralf Habacker 2015-04-02 20:18:59 UTC
Git commit aa03af3b95e62935a2b0186f4df648f9ead2758f by Ralf Habacker.
Committed on 02/04/2015 at 19:23.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71517: Uninitialized scalar field (UNINIT_CTOR).

M  +0    -6    umbrello/widgets/activitywidget.h

http://commits.kde.org/umbrello/aa03af3b95e62935a2b0186f4df648f9ead2758f
Comment 30 Ralf Habacker 2015-04-02 20:18:59 UTC
Git commit e7db90ebfea351a1d99e04324eda4c3887eac6ea by Ralf Habacker.
Committed on 02/04/2015 at 19:27.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71513: Uninitialized scalar field (UNINIT_CTOR).

M  +2    -1    umbrello/codeimport/javaimport.cpp

http://commits.kde.org/umbrello/e7db90ebfea351a1d99e04324eda4c3887eac6ea
Comment 31 Ralf Habacker 2015-04-02 20:19:00 UTC
Git commit 2fed75809789f30e91da9382bd962f6d7df102ba by Ralf Habacker.
Committed on 02/04/2015 at 19:32.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71509: Uninitialized scalar field (UNINIT_CTOR).

M  +3    -1    umbrello/widgets/signalwidget.cpp

http://commits.kde.org/umbrello/2fed75809789f30e91da9382bd962f6d7df102ba
Comment 32 Ralf Habacker 2015-04-02 20:19:01 UTC
Git commit 24247b281a308d32953efff880cd96898920092c by Ralf Habacker.
Committed on 02/04/2015 at 19:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71507: Uninitialized scalar field (UNINIT_CTOR).

M  +2    -1    umbrello/codeimport/csharp/csharpimport.cpp

http://commits.kde.org/umbrello/24247b281a308d32953efff880cd96898920092c
Comment 33 Ralf Habacker 2015-04-02 20:19:01 UTC
Git commit 3d94627f2da194da87bc8728369d109e95ac50d1 by Ralf Habacker.
Committed on 02/04/2015 at 19:38.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71506: Uninitialized scalar field (UNINIT_CTOR).

M  +0    -1    umbrello/umllistview.h

http://commits.kde.org/umbrello/3d94627f2da194da87bc8728369d109e95ac50d1
Comment 34 Ralf Habacker 2015-04-02 20:46:49 UTC
Git commit d18e52238964ac2949acefbf71c67edc09a02c30 by Ralf Habacker.
Committed on 02/04/2015 at 20:28.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71490: Uninitialized scalar field (UNINIT_CTOR).

M  +1    -1    lib/cppparser/parser.h

http://commits.kde.org/umbrello/d18e52238964ac2949acefbf71c67edc09a02c30
Comment 35 Ralf Habacker 2015-04-02 20:46:51 UTC
Git commit 3e622d9570439485fb6d880c92f6f08fcc373b5d by Ralf Habacker.
Committed on 02/04/2015 at 20:36.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71484: Uninitialized scalar field (UNINIT_CTOR).

M  +3    -1    lib/interfaces/hashedstring.cpp

http://commits.kde.org/umbrello/3e622d9570439485fb6d880c92f6f08fcc373b5d
Comment 36 Ralf Habacker 2015-04-02 20:46:52 UTC
Git commit facd1cd77becfbd07a88b2025b1470c895248128 by Ralf Habacker.
Committed on 02/04/2015 at 20:39.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71483: Uninitialized scalar field (UNINIT_CTOR).

M  +1    -0    umbrello/codegenerators/d/dwriter.cpp

http://commits.kde.org/umbrello/facd1cd77becfbd07a88b2025b1470c895248128
Comment 37 Ralf Habacker 2015-04-02 20:46:53 UTC
Git commit 8e000103d2c0011c498bc71088b508e34f979900 by Ralf Habacker.
Committed on 02/04/2015 at 20:44.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71486: Uninitialized scalar field (UNINIT_CTOR).

M  +4    -0    lib/cppparser/lexer.h

http://commits.kde.org/umbrello/8e000103d2c0011c498bc71088b508e34f979900
Comment 38 Ralf Habacker 2015-04-02 20:46:53 UTC
Git commit 7380a0fcc911de5c2b812e2053b0034bb0c6c87f by Ralf Habacker.
Committed on 02/04/2015 at 20:45.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71501: Uninitialized scalar field (UNINIT_CTOR).

M  +4    -0    lib/cppparser/lexer.h

http://commits.kde.org/umbrello/7380a0fcc911de5c2b812e2053b0034bb0c6c87f
Comment 39 Ralf Habacker 2015-04-02 20:48:51 UTC
Git commit f815d8d2678bc358c6f50b369b31a103c040e0dd by Ralf Habacker.
Committed on 02/04/2015 at 19:59.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71504: Uninitialized scalar field (UNINIT_CTOR).

M  +2    -1    umbrello/listpopupmenu.cpp

http://commits.kde.org/umbrello/f815d8d2678bc358c6f50b369b31a103c040e0dd
Comment 40 Ralf Habacker 2015-04-02 20:49:03 UTC
Git commit ae5aa1e9713e797d2fa4080ba9da20ff7f7ceeb7 by Ralf Habacker.
Committed on 02/04/2015 at 19:46.
Pushed by habacker into branch 'Applications/15.04'.

Fix indention of class ListPopupmenu constructor initialisation list.

M  +6    -3    umbrello/listpopupmenu.cpp

http://commits.kde.org/umbrello/ae5aa1e9713e797d2fa4080ba9da20ff7f7ceeb7
Comment 41 Ralf Habacker 2015-04-02 20:49:03 UTC
Git commit 9daf1564587e31060eebb6ff3ccd4d1d4032a967 by Ralf Habacker.
Committed on 02/04/2015 at 20:18.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71500: Uninitialized scalar field (UNINIT_CTOR).

M  +1    -1    umbrello/codeimport/idlimport.h

http://commits.kde.org/umbrello/9daf1564587e31060eebb6ff3ccd4d1d4032a967
Comment 42 Ralf Habacker 2015-04-02 20:49:10 UTC
Git commit bb6144a6628e8f465abf6f93b8f4bf180a8aca88 by Ralf Habacker.
Committed on 02/04/2015 at 20:07.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71503: Uninitialized scalar field (UNINIT_CTOR).

M  +5    -1    lib/cppparser/macro.h

http://commits.kde.org/umbrello/bb6144a6628e8f465abf6f93b8f4bf180a8aca88
Comment 43 Ralf Habacker 2015-04-02 22:31:50 UTC
Git commit 5cd7438942cf0a6ba20bd52380467835bac9ad71 by Ralf Habacker.
Committed on 02/04/2015 at 21:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71497: Nesting level does not match indentation (NESTING_INDENT_MISMATCH).

M  +1    -1    umbrello/codeimport/cppimport.cpp

http://commits.kde.org/umbrello/5cd7438942cf0a6ba20bd52380467835bac9ad71
Comment 44 Ralf Habacker 2015-04-06 18:11:02 UTC
Git commit 553f5808af1bd3eaff8288022a3d9730ee3a4769 by Ralf Habacker.
Committed on 06/04/2015 at 18:08.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88474: Use after free (USE_AFTER_FREE).

M  +1    -2    umbrello/dialogs/classwizard.cpp
M  +10   -1    umbrello/umldoc.cpp
M  +1    -1    umbrello/umldoc.h

http://commits.kde.org/umbrello/553f5808af1bd3eaff8288022a3d9730ee3a4769
Comment 45 Ralf Habacker 2015-04-09 09:58:51 UTC
Git commit 7797872bbe242d73a2fc67bfe271b6a8d5ddeca6 by Ralf Habacker.
Committed on 09/04/2015 at 09:54.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71510, 71514, 71521: Uninitialized pointer field (UNINIT_CTOR).

M  +3    -0    umbrello/dialogs/classpropertiesdialog.cpp

http://commits.kde.org/umbrello/7797872bbe242d73a2fc67bfe271b6a8d5ddeca6
Comment 46 Ralf Habacker 2015-04-09 09:58:52 UTC
Git commit 93d2b2bbdbc265293a1deb18f36ae57b244548dd by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88473: Uninitialized pointer field (UNINIT_CTOR).

M  +12   -3    umbrello/dialogs/pages/classgeneralpage.cpp

http://commits.kde.org/umbrello/93d2b2bbdbc265293a1deb18f36ae57b244548dd
Comment 47 Ralf Habacker 2015-04-09 09:58:52 UTC
Git commit 24bd64fe1d6c59817f653e1129d0be73f0e64fe4 by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71519: Uninitialized pointer field (UNINIT_CTOR).

M  +13   -3    umbrello/dialogs/pages/classgeneralpage.cpp

http://commits.kde.org/umbrello/24bd64fe1d6c59817f653e1129d0be73f0e64fe4
Comment 48 Ralf Habacker 2015-04-09 09:58:53 UTC
Git commit 60b9cb75107404063cc20c28c86142c568bdad26 by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71508: Uninitialized pointer field (UNINIT_CTOR).

M  +13   -3    umbrello/dialogs/pages/classgeneralpage.cpp

http://commits.kde.org/umbrello/60b9cb75107404063cc20c28c86142c568bdad26
Comment 49 Ralf Habacker 2015-04-09 10:18:57 UTC
Git commit 9a6b5f58f75673ad1484d3944bb72ee05104c972 by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71518: Uninitialized pointer field (UNINIT_CTOR).

M  +0    -1    umbrello/codeimpwizard/codeimpthread.h

http://commits.kde.org/umbrello/9a6b5f58f75673ad1484d3944bb72ee05104c972
Comment 50 Ralf Habacker 2015-04-09 10:19:08 UTC
Git commit 84ded6ef7c0d84d3359ba613bc7f901b42c9fd13 by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71511: Uninitialized pointer field (UNINIT_CTOR).

M  +2    -1    umbrello/dialogs/statedialog.cpp

http://commits.kde.org/umbrello/84ded6ef7c0d84d3359ba613bc7f901b42c9fd13
Comment 51 Ralf Habacker 2015-04-09 10:19:09 UTC
Git commit 6d96e7ce1ef8f6c881da73bb8f8b7a87c481635d by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71515: Uninitialized pointer field (UNINIT_CTOR).

M  +2    -0    umbrello/umldoc.cpp

http://commits.kde.org/umbrello/6d96e7ce1ef8f6c881da73bb8f8b7a87c481635d
Comment 52 Ralf Habacker 2015-04-09 10:19:09 UTC
Git commit e4e619479dcbba279bd6ec5dab1be9f0a872e528 by Ralf Habacker.
Committed on 09/04/2015 at 09:55.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71516: Uninitialized pointer field (UNINIT_CTOR).

M  +2    -1    umbrello/dialogs/umlviewdialog.cpp

http://commits.kde.org/umbrello/e4e619479dcbba279bd6ec5dab1be9f0a872e528
Comment 53 Ralf Habacker 2015-04-09 10:19:20 UTC
Git commit 3242984fe456c8f3e7014ac2a214350a0843bcf8 by Ralf Habacker.
Committed on 09/04/2015 at 09:57.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71498: Uninitialized pointer field (UNINIT_CTOR).

M  +1    -0    umbrello/codegenerators/tcl/tclwriter.cpp

http://commits.kde.org/umbrello/3242984fe456c8f3e7014ac2a214350a0843bcf8
Comment 54 Ralf Habacker 2015-04-16 08:36:20 UTC
Git commit e1e663e63585143e89fa30464f2d2c2756600f00 by Ralf Habacker.
Committed on 09/04/2015 at 11:07.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71399: Explicit null dereferenced (FORWARD_NULL).

M  +4    -2    umbrello/codegenerators/codegenfactory.cpp

http://commits.kde.org/umbrello/e1e663e63585143e89fa30464f2d2c2756600f00
Comment 55 Ralf Habacker 2015-04-16 08:36:20 UTC
Git commit 75c83e4528bd072afa718086f9f9cd7f3eb6903c by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71418: Explicit null dereferenced (FORWARD_NULL).

M  +2    -1    umbrello/codeimport/adaimport.cpp

http://commits.kde.org/umbrello/75c83e4528bd072afa718086f9f9cd7f3eb6903c
Comment 56 Ralf Habacker 2015-04-16 08:36:21 UTC
Git commit 0e6dd23fd964aff020475328a592e278bede517f by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71452: Explicit null dereferenced (FORWARD_NULL).

M  +2    -1    umbrello/codegenerators/codeparameter.cpp

http://commits.kde.org/umbrello/0e6dd23fd964aff020475328a592e278bede517f
Comment 57 Ralf Habacker 2015-04-16 08:36:23 UTC
Git commit ffec0e586fb75165927d12e405705d687b5fa045 by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71482: Explicit null dereferenced (FORWARD_NULL).

M  +2    -1    umbrello/codegenerators/codegenfactory.cpp

http://commits.kde.org/umbrello/ffec0e586fb75165927d12e405705d687b5fa045
Comment 58 Ralf Habacker 2015-04-16 08:36:23 UTC
Git commit b66ef7f992e703954c63e20b4116b4586bf79fac by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71488: Explicit null dereferenced (FORWARD_NULL).

M  +2    -1    umbrello/codegenerators/codegenfactory.cpp

http://commits.kde.org/umbrello/b66ef7f992e703954c63e20b4116b4586bf79fac
Comment 59 Ralf Habacker 2015-04-16 08:48:56 UTC
Git commit 96ea256b015ac89de65c766122d0519b71534c30 by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71393: Dereference after null check (FORWARD_NULL).

M  +5    -5    umbrello/codegenerators/d/dclassifiercodedocument.cpp

http://commits.kde.org/umbrello/96ea256b015ac89de65c766122d0519b71534c30
Comment 60 Ralf Habacker 2015-04-16 08:48:57 UTC
Git commit e53287106bac07f73f1b8670f02894f26f960216 by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71392: Dereference before null check (REVERSE_INULL).

M  +5    -7    umbrello/widgets/classifierwidget.cpp

http://commits.kde.org/umbrello/e53287106bac07f73f1b8670f02894f26f960216
Comment 61 Ralf Habacker 2015-04-16 08:48:57 UTC
Git commit 65e293fb34605ad8131ffdbbe4444163a135cbb1 by Ralf Habacker.
Committed on 09/04/2015 at 12:35.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88365: Dereference after null check (FORWARD_NULL).

M  +4    -5    umbrello/codegenerators/cpp/cppheadercodedocument.cpp

http://commits.kde.org/umbrello/65e293fb34605ad8131ffdbbe4444163a135cbb1
Comment 62 Ralf Habacker 2015-04-16 08:49:04 UTC
Git commit 96c959a6e19f5660ab9d8034728c7b8723b8f94f by Ralf Habacker.
Committed on 09/04/2015 at 12:48.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71473: Dereference after null check (FORWARD_NULL).

M  +4    -5    umbrello/codegenerators/java/javaclassifiercodedocument.cpp

http://commits.kde.org/umbrello/96c959a6e19f5660ab9d8034728c7b8723b8f94f
Comment 63 Ralf Habacker 2015-04-16 08:49:04 UTC
Git commit 32edce6171e7ab7ea20711acb50cd40ace006b98 by Ralf Habacker.
Committed on 16/04/2015 at 08:33.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88343: Logical vs. bitwise operator (CONSTANT_EXPRESSION_RESULT)

logical_vs_bitwise: The expression me->button() == Qt::LeftButton &&
Qt::KeyboardModifiers(me->modifiers()).operator int() && true /* Qt::ControlModifier */
is suspicious because it performs a Boolean operation on a constant other than 0 or 1.

M  +1    -1    umbrello/widgets/associationwidget.cpp

http://commits.kde.org/umbrello/32edce6171e7ab7ea20711acb50cd40ace006b98
Comment 64 Ralf Habacker 2015-04-16 08:49:31 UTC
Git commit aa35830cc7bbb326ded536cc54717a9fe761e51d by Ralf Habacker.
Committed on 09/04/2015 at 12:38.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 88349: Dereference after null check (FORWARD_NULL).

M  +1    -1    umbrello/codegenerators/sql/sqlwriter.cpp

http://commits.kde.org/umbrello/aa35830cc7bbb326ded536cc54717a9fe761e51d
Comment 65 Ralf Habacker 2015-04-17 07:21:55 UTC
Git commit 2cfaebafbd709483956c24766c27df499a7aa452 by Ralf Habacker.
Committed on 14/04/2015 at 13:23.
Pushed by habacker into branch 'master'.

Coverity check of master@e2a24e0, CID 88343: Logical vs. bitwise operator (CONSTANT_EXPRESSION_RESULT)

logical_vs_bitwise: The expression me->button() == Qt::LeftButton &&
Qt::KeyboardModifiers(me->modifiers()).operator int() && true /* Qt::ControlModifier */
is suspicious because it performs a Boolean operation on a constant other than 0 or 1.

M  +6    -0    umbrello/dialogs/pages/generaloptionpage.cpp
M  +1    -0    umbrello/dialogs/pages/generaloptionpage.h
M  +1    -0    umbrello/optionstate.h
M  +5    -0    umbrello/umbrello.kcfg
M  +1    -1    umbrello/widgets/associationwidget.cpp

http://commits.kde.org/umbrello/2cfaebafbd709483956c24766c27df499a7aa452
Comment 66 Ralf Habacker 2015-04-17 07:29:13 UTC
Git commit 6457ef70622e5651989567d434d508b9e05cbbd0 by Ralf Habacker.
Committed on 17/04/2015 at 07:28.
Pushed by habacker into branch 'master'.

Coverity check of master@e2a24e0, CID 88343: Logical vs. bitwise operator (CONSTANT_EXPRESSION_RESULT)

logical_vs_bitwise: The expression me->button() == Qt::LeftButton &&
Qt::KeyboardModifiers(me->modifiers()).operator int() && true /* Qt::ControlModifier */
is suspicious because it performs a Boolean operation on a constant other than 0 or 1.

M  +1    -1    umbrello/widgets/associationwidget.cpp

http://commits.kde.org/umbrello/6457ef70622e5651989567d434d508b9e05cbbd0
Comment 67 Ralf Habacker 2015-04-20 22:04:03 UTC
Git commit f152e717902bca41fac830419be52b665e5d023f by Ralf Habacker.
Committed on 20/04/2015 at 21:51.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71468: Dereference after null check (FORWARD_NULL).

Passing null pointer umlassoc to stereotype, which dereferences it.

M  +6    -4    umbrello/widgets/associationwidget.cpp

http://commits.kde.org/umbrello/f152e717902bca41fac830419be52b665e5d023f
Comment 68 Ralf Habacker 2015-04-20 22:04:04 UTC
Git commit 80a19f4525b1809ceacab1c02fe21a02bd9c3db1 by Ralf Habacker.
Committed on 20/04/2015 at 21:56.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check of master@e2a24e0, CID 71492: Dereference after null check (FORWARD_NULL)

Passing null pointer oldClassifier to name, which dereferences it.

M  +2    -2    umbrello/refactoring/refactoringassistant.cpp

http://commits.kde.org/umbrello/80a19f4525b1809ceacab1c02fe21a02bd9c3db1
Comment 69 Ralf Habacker 2015-06-08 07:38:28 UTC
Git commit 5a9f235ecb53191f1028463e2d09c4475a426832 by Ralf Habacker.
Committed on 08/06/2015 at 07:38.
Pushed by habacker into branch 'Applications/15.04'.

Coverity check CID 71527: Uninitialized pointer field (UNINIT_CTOR).

Class member m_currentClass is not initialized in this constructor nor in any functions that it calls.

M  +2    -1    umbrello/codeimport/kdevcppparser/cpptree2uml.cpp

http://commits.kde.org/umbrello/5a9f235ecb53191f1028463e2d09c4475a426832
Comment 70 Ralf Habacker 2015-06-08 07:49:35 UTC
Git commit d454f2b8d033a2fb28d56d62130bbbb8c5800bbe by Ralf Habacker.
Committed on 08/06/2015 at 07:34.
Pushed by habacker into branch 'master'.

Coverity check CID 71527: Uninitialized pointer field (UNINIT_CTOR).

Class member m_currentClass is not initialized in this constructor nor in any functions that it calls.

M  +2    -1    umbrello/codeimport/kdevcppparser/cpptree2uml.cpp

http://commits.kde.org/umbrello/d454f2b8d033a2fb28d56d62130bbbb8c5800bbe
Comment 71 Oliver Kellogg 2015-07-15 21:19:40 UTC
At https://git.reviewboard.kde.org/r/124358/ (Change Summary), Patrick Eigensatz wrote:
> "Fix issues reported by Coverity" is actually a bug...

Thanks for noticing. Changing to task.
Comment 72 Ralf Habacker 2015-07-20 11:52:30 UTC
Git commit a360dbb6381f69179aa8f911c8a8016e0f10f614 by Ralf Habacker, on behalf of Patrick Eigensatz.
Committed on 20/07/2015 at 11:51.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 88416: Dereference before null check (REVERSE_INULL)

Null-checking at suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

M  +12   -7    umbrello/codegenerators/pascal/pascalwriter.cpp

http://commits.kde.org/umbrello/a360dbb6381f69179aa8f911c8a8016e0f10f614
Comment 73 Ralf Habacker 2015-08-06 10:29:35 UTC
Git commit f296ff14d9b2582fc63aad7356a13e0845900f0c by Ralf Habacker.
Committed on 06/08/2015 at 10:29.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 71398, 71403, 71416, 71450, 71471: Use pass-by-reference instead of pass-by-value to speed codegeneration up and use less resources.

The flaw/correction is everywhere the same:
... getCodeViewerDialog(... , Settings::CodeViewerState & state)

REVIEW:124358

M  +1    -1    umbrello/codegenerators/codegenerator.cpp
M  +1    -1    umbrello/codegenerators/codegenerator.h
M  +1    -1    umbrello/codegenerators/cpp/cppcodegenerator.cpp
M  +1    -1    umbrello/codegenerators/cpp/cppcodegenerator.h
M  +1    -1    umbrello/codegenerators/d/dcodegenerator.cpp
M  +1    -1    umbrello/codegenerators/d/dcodegenerator.h
M  +1    -1    umbrello/codegenerators/java/javacodegenerator.cpp
M  +1    -1    umbrello/codegenerators/java/javacodegenerator.h
M  +1    -1    umbrello/codegenerators/ruby/rubycodegenerator.cpp
M  +1    -1    umbrello/codegenerators/ruby/rubycodegenerator.h

http://commits.kde.org/umbrello/f296ff14d9b2582fc63aad7356a13e0845900f0c
Comment 74 Ralf Habacker 2015-08-06 19:21:41 UTC
Git commit 55bf458a0909c53e01364f8619e674d217036873 by Ralf Habacker.
Committed on 06/08/2015 at 18:04.
Pushed by habacker into branch 'Applications/15.08'.

Coverige check CID 130238:  Uninitialized members  (UNINIT_CTOR)

Non-static class member "notNullConstraint" is not initialized in this constructor nor in any functions that it calls.

M  +1    -0    umbrello/codeimport/sqlimport.h

http://commits.kde.org/umbrello/55bf458a0909c53e01364f8619e674d217036873
Comment 75 Ralf Habacker 2015-08-06 19:21:41 UTC
Git commit de048ebc5d2bdb99b6dd47e2ef1f04c5a6c4757e by Ralf Habacker.
Committed on 06/08/2015 at 18:24.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 130234: Unchecked dynamic_cast (FORWARD_NULL)

Passing null pointer entity to addAssocToConcepts, which dereferences it.

M  +8    -2    umbrello/codeimport/sqlimport.cpp

http://commits.kde.org/umbrello/de048ebc5d2bdb99b6dd47e2ef1f04c5a6c4757e
Comment 76 Ralf Habacker 2015-08-06 19:21:42 UTC
Git commit 256bad109adaf041cd010afa0c44cedaea3e5ffa by Ralf Habacker.
Committed on 06/08/2015 at 19:20.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 130233: Dereference after null check (FORWARD_NULL)

Passing null pointer entity to ..., which dereferences it.

M  +30   -9    umbrello/codeimport/sqlimport.cpp

http://commits.kde.org/umbrello/256bad109adaf041cd010afa0c44cedaea3e5ffa
Comment 77 Ralf Habacker 2015-08-06 19:21:42 UTC
Git commit b91e1eb7a7730fbead84b3fbbfcdf0be3d3b6337 by Ralf Habacker.
Committed on 06/08/2015 at 19:21.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 130231: Unchecked dynamic_cast (FORWARD_NULL)

Passing null pointer enumType to addEnumLiteral, which dereferences it.

M  +6    -2    umbrello/codeimport/sqlimport.cpp

http://commits.kde.org/umbrello/b91e1eb7a7730fbead84b3fbbfcdf0be3d3b6337
Comment 78 Ralf Habacker 2015-08-06 19:25:54 UTC
Git commit 7303218e91c2887b6ad803f82e9920ac0da45839 by Ralf Habacker, on behalf of Patrick Eigensatz.
Committed on 06/08/2015 at 19:22.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 71427: Dereference before null check (REVERSE_INULL)

Null-checking this->m_umlObject suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

REVIEW:124363

M  +3    -1    umbrello/widgets/packagewidget.cpp

http://commits.kde.org/umbrello/7303218e91c2887b6ad803f82e9920ac0da45839
Comment 79 Ralf Habacker 2015-08-07 04:13:01 UTC
Git commit f3f90c49d09e97d54fbe291d0ed33be26536a768 by Ralf Habacker.
Committed on 06/08/2015 at 20:29.
Pushed by habacker into branch 'Applications/15.08'.

CID 88456 : Resource leak (RESOURCE_LEAK)

Variable a1 going out of scope leaks the storage it points to.

M  +2    -3    unittests/TEST_basictypes.cpp

http://commits.kde.org/umbrello/f3f90c49d09e97d54fbe291d0ed33be26536a768
Comment 80 Ralf Habacker 2015-08-07 04:13:01 UTC
Git commit 7e3fbbd46a717f73fe0f4d511e4466b08f64625c by Ralf Habacker.
Committed on 06/08/2015 at 20:30.
Pushed by habacker into branch 'Applications/15.08'.

CID 88465: Resource leak (RESOURCE_LEAK)

Variable a2 going out of scope leaks the storage it points to.

M  +2    -3    unittests/TEST_basictypes.cpp

http://commits.kde.org/umbrello/7e3fbbd46a717f73fe0f4d511e4466b08f64625c
Comment 81 Ralf Habacker 2015-08-07 18:59:26 UTC
Git commit d2daaa3bed35caa8beed9b87ccf647ff147bd25a by Ralf Habacker, on behalf of Patrick Eigensatz.
Committed on 07/08/2015 at 18:56.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 88355: NULL pointer check

In UMLListView::moveObject(*): Pointer is checked against null but then dereferenced anyway

COVERITY:88355
REVIEW:124654

M  +5    -0    umbrello/umllistview.cpp

http://commits.kde.org/umbrello/d2daaa3bed35caa8beed9b87ccf647ff147bd25a
Comment 82 Ralf Habacker 2015-08-08 14:09:38 UTC
Git commit 335a582b4878ecb88ba2c97d8f76546ea5822593 by Ralf Habacker, on behalf of Patrick Eigensatz.
Committed on 08/08/2015 at 14:05.
Pushed by habacker into branch 'Applications/15.08'.

Coverity Check: codegenerators: Fixing unchecked dynamic_casts

This fixes Coverity check CIDs: 71404, 71405, 71409, 71415, 71430,
71432, 71434, 71435, 71438, 71439, 71446, 71453, 71456, 71457,
71458, 71460

Coverity reported lots of errors (> 50) of the same type:

T *var = dynamic_cast<T>(a);
foo(var);

var was never checked against NULL.
REVIEW:124658

M  +17   -0    umbrello/codegenerators/cpp/cppheadercodeaccessormethod.cpp
M  +8    -1    umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.cpp
M  +33   -0    umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.cpp
M  +8    -0    umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.cpp
M  +8    -0    umbrello/codegenerators/d/dcodeaccessormethod.cpp
M  +17   -1    umbrello/codegenerators/d/dcodeclassfielddeclarationblock.cpp
M  +15   -0    umbrello/codegenerators/java/javacodeclassfielddeclarationblock.cpp
M  +9    -0    umbrello/codegenerators/java/javacodeoperation.cpp
M  +15   -0    umbrello/codegenerators/ruby/rubycodeaccessormethod.cpp
M  +9    -0    umbrello/codegenerators/ruby/rubycodeoperation.cpp

http://commits.kde.org/umbrello/335a582b4878ecb88ba2c97d8f76546ea5822593
Comment 83 Ralf Habacker 2015-10-06 20:56:44 UTC
Git commit ce856e566a7a9e5551e1fa44af8e46f6917acb98 by Ralf Habacker.
Committed on 06/10/2015 at 20:56.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 152231:  Null pointer dereferences

Dereferencing a pointer that might be null uuc when calling parent.

M  +5    -0    umbrello/umllistview.cpp

http://commits.kde.org/umbrello/ce856e566a7a9e5551e1fa44af8e46f6917acb98
Comment 84 Ralf Habacker 2015-10-06 21:29:51 UTC
Git commit 8801f7981e9fc40ff9c64372246971ac8224f30d by Ralf Habacker.
Committed on 06/10/2015 at 21:24.
Pushed by habacker into branch 'Applications/15.08'.

Coverity check CID 71444: Dereference after null check (FORWARD_NULL)

Passing null pointer this->m_nameWidget to removeWidget, which
dereferences it.

M  +1    -1    umbrello/widgets/associationwidget.cpp

http://commits.kde.org/umbrello/8801f7981e9fc40ff9c64372246971ac8224f30d
Comment 85 Ralf Habacker 2015-12-08 10:00:42 UTC
Git commit 09189bc5ab29bb8d4614b3441fe20dbd29b03d1a by Ralf Habacker.
Committed on 08/12/2015 at 10:00.
Pushed by habacker into branch 'Applications/15.12'.

Coverity check CID 155784: Uninitialized members  (UNINIT_CTOR)

Non-static class member "stereotypesWindow" is not initialized in this
constructor nor in any functions that it calls.

We also initialize viewStereotypesWindow too.

M  +3    -1    umbrello/umlappprivate.h

http://commits.kde.org/umbrello/09189bc5ab29bb8d4614b3441fe20dbd29b03d1a
Comment 86 Ralf Habacker 2015-12-16 18:47:24 UTC
Git commit 986080cd7a3d9ce221d3cbe5294299b49d008c5f by Ralf Habacker.
Committed on 16/12/2015 at 18:15.
Pushed by habacker into branch 'frameworks'.

Coverity check CID 152231:  Null pointer dereferences

Dereferencing a pointer that might be null uuc when calling parent.

M  +5    -0    umbrello/umllistview.cpp

http://commits.kde.org/umbrello/986080cd7a3d9ce221d3cbe5294299b49d008c5f
Comment 87 Ralf Habacker 2015-12-16 18:49:59 UTC
Git commit df9f5536c3180efba0d8247eae00e696f2a879f7 by Ralf Habacker.
Committed on 16/12/2015 at 18:15.
Pushed by habacker into branch 'frameworks'.

Coverity check CID 71444: Dereference after null check (FORWARD_NULL)

Passing null pointer this->m_nameWidget to removeWidget, which
dereferences it.

M  +1    -1    umbrello/umlwidgets/associationwidget.cpp

http://commits.kde.org/umbrello/df9f5536c3180efba0d8247eae00e696f2a879f7
Comment 88 Ralf Habacker 2016-05-30 10:20:16 UTC
Git commit 455365a5bec9cc47020ca6e8e178a23160db65ff by Ralf Habacker.
Committed on 30/05/2016 at 08:26.
Pushed by habacker into branch 'Applications/16.04'.

Fix coverity check CID 161662: Control flow issues  (MISSING_BREAK)

This is not really a bug; the fix makes the case more robust.

M  +3    -0    umbrello/listpopupmenu.cpp

http://commits.kde.org/umbrello/455365a5bec9cc47020ca6e8e178a23160db65ff
Comment 89 Ralf Habacker 2016-05-30 10:20:16 UTC
Git commit da9dcc1afb1a1c260b2d262ef60f79fdb5f1e333 by Ralf Habacker.
Committed on 30/05/2016 at 10:19.
Pushed by habacker into branch 'Applications/16.04'.

Fix coverity CID 161660: (FORWARD_NULL)

Assigning: "obj" = "dynamic_cast <UMLObject const *>(this->sender())".

M  +2    -0    umbrello/refactoring/refactoringassistant.cpp

http://commits.kde.org/umbrello/da9dcc1afb1a1c260b2d262ef60f79fdb5f1e333
Comment 90 Ralf Habacker 2016-06-09 23:01:55 UTC
Git commit 781277cf06ada224457cfaed33661439242d2269 by Ralf Habacker.
Committed on 09/06/2016 at 21:39.
Pushed by habacker into branch 'master'.

Fix coverity CID 161660: (FORWARD_NULL)

Assigning: "obj" = "dynamic_cast <UMLObject const *>(this->sender())".

M  +2    -0    umbrello/refactoring/refactoringassistant.cpp

http://commits.kde.org/umbrello/781277cf06ada224457cfaed33661439242d2269
Comment 91 Ralf Habacker 2016-06-09 23:01:55 UTC
Git commit e7fffc4bdff971335c8f81aa739517378aeb651a by Ralf Habacker.
Committed on 09/06/2016 at 21:39.
Pushed by habacker into branch 'master'.

Fix coverity check CID 161662: Control flow issues  (MISSING_BREAK)

This is not really a bug; the fix makes the case more robust.

M  +3    -0    umbrello/listpopupmenu.cpp

http://commits.kde.org/umbrello/e7fffc4bdff971335c8f81aa739517378aeb651a
Comment 92 Ralf Habacker 2016-08-25 05:11:01 UTC
Git commit 1f396fb945219d752336d6e8dcc574cf1e02bd6e by Ralf Habacker.
Committed on 25/08/2016 at 05:10.
Pushed by habacker into branch 'Applications/16.08'.

Fix coverity check CID 168629:  Uninitialized members  (UNINIT_CTOR)

Non-static class member "m_count" is not initialized in this constructor
nor in any functions that it calls.

M  +1    -0    umbrello/models/diagramsmodel.cpp

http://commits.kde.org/umbrello/1f396fb945219d752336d6e8dcc574cf1e02bd6e
Comment 93 Ralf Habacker 2016-08-25 05:31:00 UTC
Git commit e380a55da225ff09cfaf2d02d61ca19999262cd0 by Ralf Habacker.
Committed on 25/08/2016 at 05:21.
Pushed by habacker into branch 'Applications/16.08'.

Fixed coverity check CID 161661: Unchecked dynamic_cast (FORWARD_NULL)

Passing null pointer pConcept to findChildObject, which dereferences it.
(The dereference happens because this is a virtual function call.)

M  +5    -0    umbrello/dialogs/umlenumliteraldialog.cpp

http://commits.kde.org/umbrello/e380a55da225ff09cfaf2d02d61ca19999262cd0
Comment 94 Ralf Habacker 2016-08-25 18:24:42 UTC
Git commit b456e10ec55821277e9ec36394495376f694011b by Ralf Habacker.
Committed on 25/08/2016 at 07:36.
Pushed by habacker into branch 'Applications/16.08'.

Fixup of CID 71463.

Guard additional dynamic cast and use correct object for error reporting.

M  +7    -2    umbrello/dialogs/pages/classifierlistpage.cpp

http://commits.kde.org/umbrello/b456e10ec55821277e9ec36394495376f694011b
Comment 95 Ralf Habacker 2016-08-27 06:56:29 UTC
Git commit 4fe5fbe3944632b3324f0f8e8f8cfe1a82ce9a94 by Ralf Habacker.
Committed on 27/08/2016 at 06:56.
Pushed by habacker into branch 'Applications/16.08'.

Fix coverity check CID 71396: Unchecked dynamic_cast (FORWARD_NULL)

Passing null pointer dynamic_cast <UMLOperation *>(listItem) to
getSourceCode, which dereferences it.

M  +6    -1    umbrello/dialogs/pages/classifierlistpage.cpp

http://commits.kde.org/umbrello/4fe5fbe3944632b3324f0f8e8f8cfe1a82ce9a94
Comment 96 Ralf Habacker 2016-09-12 21:23:36 UTC
Git commit c4389129412005b5c4ceb4ef683a2a5020e71e73 by Ralf Habacker.
Committed on 12/09/2016 at 21:12.
Pushed by habacker into branch 'master'.

Fix coverity check CID 169652:  Null pointer dereferences  (FORWARD_NULL)

Assigning: "myItem" = "dynamic_cast <UMLListViewItem *>(item)".

M  +2    -0    umbrello/umllistview.cpp

http://commits.kde.org/umbrello/c4389129412005b5c4ceb4ef683a2a5020e71e73
Comment 97 Ralf Habacker 2016-09-12 21:23:36 UTC
Git commit 86e3b8cb5d4a9b91ac13266fd001dad3424cf3a6 by Ralf Habacker.
Committed on 12/09/2016 at 21:13.
Pushed by habacker into branch 'master'.

Fix coverity check CID 169653:  Null pointer dereferences  (FORWARD_NULL)

Assigning: "myItem" = "dynamic_cast <UMLListViewItem *>(item)".

M  +2    -0    umbrello/umllistview.cpp

http://commits.kde.org/umbrello/86e3b8cb5d4a9b91ac13266fd001dad3424cf3a6
Comment 98 Ralf Habacker 2016-09-12 21:23:36 UTC
Git commit ad83879702d80a4e85df7a14f50935dbb1f7d012 by Ralf Habacker.
Committed on 12/09/2016 at 21:23.
Pushed by habacker into branch 'master'.

Fix coverity check CID 169655:    (USE_AFTER_FREE)

Passing freed pointer "umlobject" as an argument to
"sigObjectRemoved".sigObjectRemoved.

The 'object removed' signal is now emitted before object destroying.

M  +3    -2    umbrello/umldoc.cpp

http://commits.kde.org/umbrello/ad83879702d80a4e85df7a14f50935dbb1f7d012
Comment 99 Ralf Habacker 2016-09-12 21:27:31 UTC
Git commit 03513107a4fc0703bba116f98888c3c35ec6767c by Ralf Habacker.
Committed on 12/09/2016 at 21:15.
Pushed by habacker into branch 'master'.

Fix coverity check CID 155784:  Uninitialized members  (UNINIT_CTOR)

Non-static class member "objectsWindow" is not initialized in this
constructor nor in any functions that it calls.

M  +1    -0    umbrello/umlappprivate.h

http://commits.kde.org/umbrello/03513107a4fc0703bba116f98888c3c35ec6767c
Comment 100 Ralf Habacker 2016-09-28 09:31:41 UTC
Git commit c652fa72b97751d4783a35b90f54fd5baceb4042 by Ralf Habacker.
Committed on 28/09/2016 at 09:30.
Pushed by habacker into branch 'master'.

Fix coverity check CID 170379: Unchecked return value (CHECKED_RETURN)

Calling TraverseDecl without checking return value.

M  +2    -1    unittests/testllvmparser.cpp

http://commits.kde.org/umbrello/c652fa72b97751d4783a35b90f54fd5baceb4042
Comment 101 Ralf Habacker 2016-09-28 09:46:55 UTC
Git commit 0b9b23481cc5d73e5dae86f257f66e2b56d22708 by Ralf Habacker.
Committed on 28/09/2016 at 09:34.
Pushed by habacker into branch 'master'.

Fix coverity check CID 155784: Uninitialized pointer field (UNINIT_CTOR)

Non-static class member viewObjectsWindow is not initialized in this
constructor nor in any functions that it calls.

M  +1    -0    umbrello/umlappprivate.h

http://commits.kde.org/umbrello/0b9b23481cc5d73e5dae86f257f66e2b56d22708
Comment 102 Ralf Habacker 2016-12-19 19:09:13 UTC
Git commit a05717e2dc050218ff5e8213288a94f4d8e58611 by Ralf Habacker.
Committed on 19/12/2016 at 19:06.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity check CID 172677: Dereference after null check (FORWARD_NULL)

Passing null pointer dt to setIsReference, which dereferences it.

M  +1    -1    umbrello/codeimport/import_utils.cpp

https://commits.kde.org/umbrello/a05717e2dc050218ff5e8213288a94f4d8e58611
Comment 103 Ralf Habacker 2016-12-19 19:09:13 UTC
Git commit c35cc011c3bb1b8d3e9e8cc4d852584b13d3ae27 by Ralf Habacker.
Committed on 19/12/2016 at 19:09.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity check CID 172678: Dereference after null check (FORWARD_NULL)

Passing null pointer o to setStereotype, which dereferences it.

M  +1    -1    umbrello/codeimport/import_utils.cpp

https://commits.kde.org/umbrello/c35cc011c3bb1b8d3e9e8cc4d852584b13d3ae27
Comment 104 Ralf Habacker 2016-12-19 19:28:29 UTC
Git commit ec4653c26e7f37e62959eb48b51accaf1891fe82 by Ralf Habacker.
Committed on 19/12/2016 at 19:28.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity check CID 71493: Unchecked dynamic_cast (FORWARD_NULL)

Passing null pointer itmParent to text, which dereferences it.

M  +2    -1    umbrello/umllistview.cpp

https://commits.kde.org/umbrello/ec4653c26e7f37e62959eb48b51accaf1891fe82
Comment 105 Ralf Habacker 2016-12-20 22:39:57 UTC
Git commit 50a4f787ac1ac62d656982d6a82afdd99dfe114d by Ralf Habacker.
Committed on 19/12/2016 at 21:31.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity check CID 173356: Dereference null return value

Dereferencing a pointer that might be null umlWidget when calling
addWidgetToScene.

M  +2    -2    umbrello/cmds/widget/cmdcreatewidget.cpp

https://commits.kde.org/umbrello/50a4f787ac1ac62d656982d6a82afdd99dfe114d
Comment 106 Ralf Habacker 2016-12-20 22:39:57 UTC
Git commit bc78584c44395be64a2b29baf97e38a20de28863 by Ralf Habacker.
Committed on 20/12/2016 at 22:08.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity check CID 173355: Unchecked dynamic_cast

Passing null pointer dynamic_cast <ClassifierWidget *>(object)
to makeClassifierPopup, which dereferences it.

M  +5    -2    umbrello/listpopupmenu.cpp

https://commits.kde.org/umbrello/bc78584c44395be64a2b29baf97e38a20de28863
Comment 107 Ralf Habacker 2016-12-21 14:18:23 UTC
Git commit 9ed47597b5506956e1ca9f4bced7ece3efe12d3e by Ralf Habacker, on behalf of Carsten Clever.
Committed on 21/12/2016 at 14:15.
Pushed by habacker into branch 'master'.

Fix coverity check CID 173354 and 173353: NULL pointer derefences
Related: bug 371990

M  +5    -3    umbrello/cmds/widget/cmdremovewidget.cpp
M  +3    -2    umbrello/umlscene.cpp

https://commits.kde.org/umbrello/9ed47597b5506956e1ca9f4bced7ece3efe12d3e
Comment 108 Ralf Habacker 2017-01-04 08:52:21 UTC
Git commit 314b1973ec721f6296134fddefe31a04abe4385f by Ralf Habacker.
Committed on 04/01/2017 at 08:51.
Pushed by habacker into branch 'Applications/16.12'.

Fix some potential null pointer dereferences.

M  +1    -1    umbrello/codeimport/import_utils.cpp
M  +1    -1    umbrello/umldoc.cpp
M  +1    -1    umbrello/umllistview.cpp
M  +3    -3    umbrello/umllistviewitem.cpp
M  +2    -1    umbrello/umlmodel/entity.cpp
M  +4    -1    umbrello/umlmodel/operation.cpp

https://commits.kde.org/umbrello/314b1973ec721f6296134fddefe31a04abe4385f
Comment 109 Ralf Habacker 2017-01-04 10:48:52 UTC
Git commit e6918655c114abd6f092a762b58173461638f7d1 by Ralf Habacker.
Committed on 04/01/2017 at 10:48.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity CID 173731: Explicit null dereferenced (FORWARD_NULL)

Passing null pointer parent to parseOperation, which dereferences it.

M  +1    -1    umbrello/model_utils.cpp

https://commits.kde.org/umbrello/e6918655c114abd6f092a762b58173461638f7d1
Comment 110 Ralf Habacker 2017-01-04 10:48:52 UTC
Git commit 15cb4ee3af4f9a374885afcadba7328c581a6bc6 by Ralf Habacker.
Committed on 04/01/2017 at 10:48.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity CID 88471: Dereference before null check (REVERSE_INULL)

Null-checking at suggests that it may be null, but it has already been
dereferenced on all paths leading to the check.

M  +1    -1    umbrello/codegenerators/ada/adawriter.cpp

https://commits.kde.org/umbrello/15cb4ee3af4f9a374885afcadba7328c581a6bc6
Comment 111 Ralf Habacker 2017-01-04 10:48:53 UTC
Git commit daeff480d3c99a1553f942dee85a453d39a3e707 by Ralf Habacker.
Committed on 04/01/2017 at 10:48.
Pushed by habacker into branch 'Applications/16.12'.

Fix coverity CID 88350: Unchecked dynamic_cast (FORWARD_NULL)

Passing null pointer classifier to writeUse, which dereferences it.

M  +6    -2    umbrello/codegenerators/tcl/tclwriter.cpp

https://commits.kde.org/umbrello/daeff480d3c99a1553f942dee85a453d39a3e707
Comment 112 Ralf Habacker 2017-04-18 07:33:33 UTC
Git commit 7bcc1be741d997aced2c7acb65f1385c5d61a862 by Ralf Habacker.
Committed on 18/04/2017 at 07:33.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 178698: Unchecked dynamic_cast

Passing null pointer pConcept to findChildObject, which dereferences it.

M  +2    -2    umbrello/dialogs/umlinstanceattributedialog.cpp

https://commits.kde.org/umbrello/7bcc1be741d997aced2c7acb65f1385c5d61a862
Comment 113 Ralf Habacker 2017-04-18 18:47:23 UTC
Git commit be41ee4a7c68cbdf42f89984f3e02989f62513e7 by Ralf Habacker.
Committed on 18/04/2017 at 18:37.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88416: Dereference before null check

Null-checking at suggests that it may be null, but it has already been
dereferenced on all paths leading to the check.

M  +1    -1    umbrello/codegenerators/pascal/pascalwriter.cpp

https://commits.kde.org/umbrello/be41ee4a7c68cbdf42f89984f3e02989f62513e7
Comment 114 Ralf Habacker 2017-04-18 18:47:23 UTC
Git commit d88258ee4f4cdaf60957f8077c53d0adc949d7bf by Ralf Habacker.
Committed on 18/04/2017 at 18:37.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88471: Dereference before null check

Null-checking at suggests that it may be null, but it has already been
dereferenced on all paths leading to the check.

M  +1    -1    umbrello/codegenerators/ada/adawriter.cpp

https://commits.kde.org/umbrello/d88258ee4f4cdaf60957f8077c53d0adc949d7bf
Comment 115 Ralf Habacker 2017-04-18 18:47:23 UTC
Git commit 8579824080da914691cf5cdaa28d1db086363940 by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88364: Unchecked dynamic_cast

Passing null pointer ddoc to getParentClassifier, which dereferences it.

M  +1    -0    umbrello/codegenerators/d/dcodeoperation.cpp

https://commits.kde.org/umbrello/8579824080da914691cf5cdaa28d1db086363940
Comment 116 Ralf Habacker 2017-04-18 18:47:23 UTC
Git commit 3fb0142dfba183aeef5f3f1db13747e44b762d5d by Ralf Habacker.
Committed on 18/04/2017 at 18:37.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88428: Dereference before null check

Null-checking attr suggests that it may be null, but it has already been
dereferenced on all paths leading to the check.

M  +6    -9    umbrello/dialogs/parameterpropertiesdialog.cpp

https://commits.kde.org/umbrello/3fb0142dfba183aeef5f3f1db13747e44b762d5d
Comment 117 Ralf Habacker 2017-04-18 18:47:23 UTC
Git commit fdd39b2fde760b11e380f4eaf70056191063ad8b by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88363: Unchecked dynamic_cast

Passing null pointer parentDoc to getParentClassifier, which
dereferences it.

M  +1    -0    umbrello/codegenerators/java/javaclassdeclarationblock.cpp

https://commits.kde.org/umbrello/fdd39b2fde760b11e380f4eaf70056191063ad8b
Comment 118 Ralf Habacker 2017-04-18 18:57:59 UTC
Git commit 223a2a31ce320a6711c52043014f4f855716f99d by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88359: Unchecked dynamic_cast

Passing null pointer doc to getParentClassifier, which dereferences it.

M  +3    -0    umbrello/codegenerators/cpp/cppsourcecodeoperation.cpp

https://commits.kde.org/umbrello/223a2a31ce320a6711c52043014f4f855716f99d
Comment 119 Ralf Habacker 2017-04-18 18:58:03 UTC
Git commit acdf3c023f848170d85ddafd0f4fe10e4f618ec3 by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88360: Unchecked dynamic_cast

Passing null pointer parentDoc to getParentClassifier, which
dereferences it.

M  +1    -0    umbrello/codegenerators/ruby/rubyclassdeclarationblock.cpp

https://commits.kde.org/umbrello/acdf3c023f848170d85ddafd0f4fe10e4f618ec3
Comment 120 Ralf Habacker 2017-04-18 18:58:04 UTC
Git commit c3dc5a2727336491bbe45f0afadab9c3e6e3a6b5 by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88358: Unchecked dynamic_cast

Passing null pointer ccd to parentIsInterface, which dereferences it.

M  +2    -0    umbrello/codegenerators/cpp/cppheadercodeoperation.cpp

https://commits.kde.org/umbrello/c3dc5a2727336491bbe45f0afadab9c3e6e3a6b5
Comment 121 Ralf Habacker 2017-04-18 18:58:04 UTC
Git commit ea2b6aa1bfa714fb7050ce46c8baac80174b88d5 by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88361: Unchecked dynamic_cast

Passing null pointer javadoc to getParentClassifier, which dereferences
it.

M  +1    -0    umbrello/codegenerators/java/javacodeoperation.cpp

https://commits.kde.org/umbrello/ea2b6aa1bfa714fb7050ce46c8baac80174b88d5
Comment 122 Ralf Habacker 2017-04-18 18:58:06 UTC
Git commit ccfd92ecb2d22f345502d7880668d195495632b4 by Ralf Habacker.
Committed on 18/04/2017 at 18:38.
Pushed by habacker into branch 'Applications/17.04'.

Fix coverity CID 88362: Unchecked dynamic_cast

Passing null pointer rubydoc to getParentClassifier, which dereferences
it.

M  +1    -0    umbrello/codegenerators/ruby/rubycodeoperation.cpp

https://commits.kde.org/umbrello/ccfd92ecb2d22f345502d7880668d195495632b4
Comment 123 Ralf Habacker 2020-03-09 10:22:14 UTC
Git commit 11775b3420d51a3f47c397698ffa535e7f0bd294 by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverity check CID 268399: Uninitialized scalar field (UNINIT_CTOR)

Non-static class member m is not initialized in this constructor
nor in any functions that it calls.

M  +1    -1    umbrello/menus/listpopupmenu.cpp

https://invent.kde.org/kde/umbrello/commit/11775b3420d51a3f47c397698ffa535e7f0bd294
Comment 124 Ralf Habacker 2020-03-09 10:22:14 UTC
Git commit fc19ac77f82957e3949edeaa72548e3f08132941 by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverty check CID 268397: Uninitialized pointer field (UNINIT_CTOR)

Non-static class member field m_GeneralWidgets.layoutTypeW is not
initialized in this constructor nor in any functions that it calls.

Removed unused class member.

M  +0    -1    umbrello/dialogs/pages/generaloptionpage.h

https://invent.kde.org/kde/umbrello/commit/fc19ac77f82957e3949edeaa72548e3f08132941
Comment 125 Ralf Habacker 2020-03-09 10:22:14 UTC
Git commit ba0e247065dd15b6b3115e234af2829ba5a11b01 by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverity check CID 268374: Uninitialized scalar field (UNINIT_CTOR)

Non-static class member layoutType is not initialized in this constructor
nor in any functions that it calls.

M  +1    -0    umbrello/optionstate.h

https://invent.kde.org/kde/umbrello/commit/ba0e247065dd15b6b3115e234af2829ba5a11b01
Comment 126 Ralf Habacker 2020-03-09 10:22:15 UTC
Git commit 7d0825f2fb112e54630a986693c08bad22e5a355 by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverity check CID 71516: Uninitialized pointer field (UNINIT_CTOR)

Non-static class member m_pChooser is not initialized in this constructor
nor in any functions that it calls.

Removed obsolete class member.

M  +1    -1    umbrello/dialogs/umlviewdialog.h

https://invent.kde.org/kde/umbrello/commit/7d0825f2fb112e54630a986693c08bad22e5a355
Comment 127 Ralf Habacker 2020-03-09 10:22:15 UTC
Git commit 35697915a3b54e34fd9777c69eee091a15bfdbe3 by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverity check CID 268393: Uninitialized scalar field (UNINIT_CTOR)

Non-static class member m_version is not initialized in this constructor
nor in any functions that it calls.

M  +1    -1    umbrello/dotgenerator.h

https://invent.kde.org/kde/umbrello/commit/35697915a3b54e34fd9777c69eee091a15bfdbe3
Comment 128 Ralf Habacker 2020-03-09 10:22:15 UTC
Git commit 4095b99768182ee244e0fcdd007a7e4b93014e8a by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverity check CID 268377: Uninitialized scalar field (UNINIT_CTOR)

Non-static class member m_showAttributeSignatures is not initialized in
this constructor nor in any functions that it calls.

M  +1    -1    umbrello/umlwidgets/entitywidget.h

https://invent.kde.org/kde/umbrello/commit/4095b99768182ee244e0fcdd007a7e4b93014e8a
Comment 129 Ralf Habacker 2020-03-09 10:22:15 UTC
Git commit 2078b68f2cb5ec1ef2a39c866c15a071c20cdd6a by Ralf Habacker.
Committed on 09/03/2020 at 10:15.
Pushed by habacker into branch 'master'.

Coverity check CID 268382: Uninitialized scalar field (UNINIT_CTOR)

Non-static class members arre not initialized in this constructor nor
in any functions that it calls.

M  +1    -1    umbrello/umlwidgets/associationline.h

https://invent.kde.org/kde/umbrello/commit/2078b68f2cb5ec1ef2a39c866c15a071c20cdd6a
Comment 130 Oliver Kellogg 2021-09-18 12:54:28 UTC
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 [details].

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
Comment 131 Oliver Kellogg 2021-11-15 20:39:40 UTC
https://scan.coverity.com/projects/3327 is configured for
  https://github.com/rhabacker/umbrello
but the fork has not been synced for a while.

@Ralf could you sync your fork with https://github.com/KDE/umbrello ?
Or perhaps change the Coverity URL to that repo?
Comment 132 Ralf Habacker 2021-11-15 21:19:25 UTC
(In reply to Oliver Kellogg from comment #131)
> https://scan.coverity.com/projects/3327 is configured for
>   https://github.com/rhabacker/umbrello
> but the fork has not been synced for a while.
> 
> @Ralf could you sync your fork with https://github.com/KDE/umbrello ?
I can sync that tomorrow, but if I remember correctly in the past I did a build locally and uploaded the scan data.  

> Or perhaps change the Coverity URL to that repo?

https://scan.coverity.com/projects/umbrello-uml-modeller/edit reports
> Repository URL ...
> Cannot be changed for GitHub projects.

Using the public url requires to open a new project on coverity.
Comment 133 Oliver Kellogg 2021-11-20 15:24:40 UTC
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
Comment 134 Oliver Kellogg 2021-12-06 19:27:17 UTC
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