MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030608Open CASCADE[OCCT] OCCT:Foundation Classespublic2019-03-26 15:142019-03-26 15:14
Reportertizmaylo 
Assigned Tokgv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030608: Undefined behavior caused by overflow in arithmetic operations with signed integers in HashCode() functions
DescriptionThere is a number of places in the code of HashCode() functions where an overflow in arithmetic operations with signed integers may possibly occur. E.g., look at BRepMesh_Triangle::HashCode:

inline Standard_Integer HashCode(const Standard_Integer theUpper) const
{
  return ::HashCode(myEdges[0] + myEdges[1] + myEdges[2], theUpper);
}

There are three signed integer that are summed up. If they would big enough, an overflow might occur. But in accordance with the C++ standard a signed integer arithmetic overflow is an undefined behavior.
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0030550verifiedbugmaster Community Coding - Integer overflow in Standard_CString HashCodes 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-03-26 15:14 tizmaylo New Issue
2019-03-26 15:14 tizmaylo Assigned To => kgv
2019-03-26 15:14 tizmaylo Relationship added related to 0030550


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker