0030550: Coding - Integer overflow in Standard_CString HashCodes
[occt.git] / src / Interface / Interface_MapAsciiStringHasher.cxx
index a9bbd38..e7a24f3 100644 (file)
 #include <TCollection_AsciiString.hxx>
 
 //=======================================================================
-//function : HashCode
-//purpose  : 
+// function : HashCode
+// purpose  :
 //=======================================================================
-Standard_Integer Interface_MapAsciiStringHasher::HashCode(const TCollection_AsciiString& K,
-                                                const Standard_Integer Upper)
+Standard_Integer Interface_MapAsciiStringHasher::HashCode (const TCollection_AsciiString& theAsciiString,
+                                                           const Standard_Integer         theUpperBound)
 {
-  return ::HashCode(K.ToCString(),Upper);
+  return ::HashCode (theAsciiString.ToCString(), theAsciiString.Length(), theUpperBound);
 }
 
 //=======================================================================