Address CodeQL finding

This commit is contained in:
LordGrey 2024-04-29 20:34:31 +02:00
parent 722d6d7ad5
commit 12ace5e418

View File

@ -181,7 +181,7 @@ bool API::setImage(ImageCmdData &data, hyperion::Components comp, QString &reply
else
{
// check consistency of the size of the received data
if (static_cast<qsizetype>(data.data.size()) != data.width * data.height * 3)
if (static_cast<size_t>(data.data.size()) != static_cast<size_t>(data.width) * static_cast<size_t>(data.height) * 3)
{
replyMsg = "Size of image data does not match with the width and height";
return false;