提交 4db3a388 编写于 作者: V Vincent Rabaud

Fix a potential UBSAN error.

We only use that value as uint64_t below anyway.
上级 1ba7c2f2
......@@ -269,7 +269,7 @@ void setSize( Mat& m, int _dims, const int* _sz, const size_t* _steps, bool auto
else if( autoSteps )
{
m.step.p[i] = total;
int64 total1 = (int64)total*s;
uint64 total1 = (uint64)total*s;
if( (uint64)total1 != (size_t)total1 )
CV_Error( CV_StsOutOfRange, "The total matrix size does not fit to \"size_t\" type" );
total = (size_t)total1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册