[coverity] 1543036 Unintentional integer overflow
This commit is contained in:
parent
aa3d05f4f2
commit
a75ddcc091
@ -398,8 +398,8 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
|
|||||||
/* discard a possible and no more relevant event */
|
/* discard a possible and no more relevant event */
|
||||||
eventfd_read(pComm->fd_write_event, NULL);
|
eventfd_read(pComm->fd_write_event, NULL);
|
||||||
/* ms */
|
/* ms */
|
||||||
ULONGLONG Tmax = nNumberOfBytesToWrite * pComm->timeouts.WriteTotalTimeoutMultiplier +
|
ULONGLONG Tmax = 1ull * nNumberOfBytesToWrite * pComm->timeouts.WriteTotalTimeoutMultiplier +
|
||||||
pComm->timeouts.WriteTotalTimeoutConstant;
|
1ull * pComm->timeouts.WriteTotalTimeoutConstant;
|
||||||
/* NB: select() may update the timeout argument to indicate
|
/* NB: select() may update the timeout argument to indicate
|
||||||
* how much time was left. Keep the timeout variable out of
|
* how much time was left. Keep the timeout variable out of
|
||||||
* the while() */
|
* the while() */
|
||||||
|
Loading…
Reference in New Issue
Block a user