mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-01 16:08:36 +00:00
Merge pull request #3037 from issakomi/cwe190-1
CWE-190 integer overflow in btConvexHullComputer
This commit is contained in:
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
Point64 cross(const Point32& b) const
|
||||
{
|
||||
return Point64(y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x);
|
||||
return Point64(((int64_t)y) * b.z - ((int64_t)z) * b.y, ((int64_t)z) * b.x - ((int64_t)x) * b.z, ((int64_t)x) * b.y - ((int64_t)y) * b.x);
|
||||
}
|
||||
|
||||
Point64 cross(const Point64& b) const
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
int64_t dot(const Point32& b) const
|
||||
{
|
||||
return x * b.x + y * b.y + z * b.z;
|
||||
return ((int64_t)x) * b.x + ((int64_t)y) * b.y + ((int64_t)z) * b.z;
|
||||
}
|
||||
|
||||
int64_t dot(const Point64& b) const
|
||||
|
||||
Reference in New Issue
Block a user