Browse Source

fix Multiplication result may overflow 'int' before it is converted to 'size_t'. (#3757)

tags/20220701
841973620 GitHub 4 years ago
parent
commit
a2e25d3fd3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tools/quantize/imreadwrite.h

+ 1
- 1
tools/quantize/imreadwrite.h View File

@@ -164,7 +164,7 @@ struct Mat

size_t total() const
{
return cols * rows * c;
return (size_t)cols * rows * c;
}

uchar* data;


Loading…
Cancel
Save