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

scan-admin at coverity.com scan-admin at coverity.com
Wed May 6 10:50:16 UTC 2015


Hi,

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

2 new defect(s) introduced to Umbrello UML Modeller found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

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


** CID 93491:  Integer handling issues  (DIVIDE_BY_ZERO)
/home/umbrello/src/umbrello/umbrello/birdview.cpp: 156 in BirdView::slotViewChanged()()


________________________________________________________________________________________________________
*** CID 93491:  Integer handling issues  (DIVIDE_BY_ZERO)
/home/umbrello/src/umbrello/umbrello/birdview.cpp: 156 in BirdView::slotViewChanged()()
150     #endif
151         }
152     
153         if (!((hmin == 0) && (hmax == 0)) |
154             !((vmin == 0) && (vmax == 0))) {
155             int width = m_protectFrame->width() * hpage / hlen;
>>>     CID 93491:  Integer handling issues  (DIVIDE_BY_ZERO)
>>>     In expression "this->m_protectFrame->height() * vpage / vlen", division by expression "vlen" which may be zero has undefined behavior.
156             int height = m_protectFrame->height() * vpage / vlen;
157             int x = m_protectFrame->width() * (hvalue - hmin) / hlen;
158             if (x > (hmax - width)) {
159                 x = hmax - width;
160             }
161             if (x <= hmin) {

** CID 93490:  Integer handling issues  (DIVIDE_BY_ZERO)
/home/umbrello/src/umbrello/umbrello/birdview.cpp: 155 in BirdView::slotViewChanged()()


________________________________________________________________________________________________________
*** CID 93490:  Integer handling issues  (DIVIDE_BY_ZERO)
/home/umbrello/src/umbrello/umbrello/birdview.cpp: 155 in BirdView::slotViewChanged()()
149                            << " / vpage: " << vpage;
150     #endif
151         }
152     
153         if (!((hmin == 0) && (hmax == 0)) |
154             !((vmin == 0) && (vmax == 0))) {
>>>     CID 93490:  Integer handling issues  (DIVIDE_BY_ZERO)
>>>     In expression "this->m_protectFrame->width() * hpage / hlen", division by expression "hlen" which may be zero has undefined behavior.
155             int width = m_protectFrame->width() * hpage / hlen;
156             int height = m_protectFrame->height() * vpage / vlen;
157             int x = m_protectFrame->width() * (hvalue - hmin) / hlen;
158             if (x > (hmax - width)) {
159                 x = hmax - width;
160             }


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/3327?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