1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #28249 from vrabaud:msan

Fix potential overflow
This commit is contained in:
Alexander Smorkalov
2025-12-20 13:15:51 +03:00
committed by GitHub
+1 -1
View File
@@ -509,7 +509,7 @@ bool PngDecoder::readData( Mat& img )
dop = chunk.p[32];
bop = chunk.p[33];
if (int(x0 + w0) > img.cols || int(y0 + h0) > img.rows || dop > 2 || bop > 1)
if ((int64_t)x0 + w0 > img.cols || (int64_t)y0 + h0 > img.rows || dop > 2 || bop > 1)
{
return false;
}