[coverity] 1543163 Unintentional integer overflow

This commit is contained in:
Armin Novak 2024-04-15 10:11:50 +02:00 committed by akallabeth
parent a75ddcc091
commit 237dfcbd9f
1 changed files with 2 additions and 2 deletions

View File

@ -186,8 +186,8 @@ BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
else
{
/* Tmax */
Tmax = nNumberOfBytesToRead * pTimeouts->ReadTotalTimeoutMultiplier +
pTimeouts->ReadTotalTimeoutConstant;
Tmax = 1ull * nNumberOfBytesToRead * pTimeouts->ReadTotalTimeoutMultiplier +
1ull * pTimeouts->ReadTotalTimeoutConstant;
/* INDEFinitely */
if ((Tmax == 0) && (pTimeouts->ReadIntervalTimeout < MAXULONG) &&