mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-27 21:43:29 +01:00
Windows: Fix some VS static analyzed warnings
This commit is contained in:
parent
d9e1d57a53
commit
fb1a4893b8
@ -692,7 +692,7 @@ void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data,
|
||||
workItem->Encryption.UnitCount = unitsPerFragment;
|
||||
workItem->Encryption.StartUnitNo.Value = fragmentStartUnitNo;
|
||||
|
||||
fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE;
|
||||
fragmentData += ((uint64)unitsPerFragment) * ENCRYPTION_DATA_UNIT_SIZE;
|
||||
fragmentStartUnitNo += unitsPerFragment;
|
||||
|
||||
if (remainder > 0 && --remainder == 0)
|
||||
|
@ -345,7 +345,7 @@ static uint64_t jent_loop_shuffle(struct rand_data *ec,
|
||||
* We add a lower boundary value to ensure we have a minimum
|
||||
* RNG loop count.
|
||||
*/
|
||||
return (shuffle + (1<<min));
|
||||
return (shuffle + (1ULL<<min));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -127,7 +127,7 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT
|
||||
goto err;
|
||||
}
|
||||
|
||||
WriteFilterBufferSize = filterInitData->MaxPagesPerWrite * PAGE_SIZE;
|
||||
WriteFilterBufferSize = ((SIZE_T)filterInitData->MaxPagesPerWrite) * PAGE_SIZE;
|
||||
|
||||
#ifdef _WIN64
|
||||
highestAcceptableWriteBufferAddr.QuadPart = 0x7FFffffFFFFLL;
|
||||
|
@ -4612,7 +4612,7 @@ void EnsureNullTerminatedString (wchar_t *str, size_t maxSizeInBytes)
|
||||
void *AllocateMemoryWithTimeout (size_t size, int retryDelay, int timeout)
|
||||
{
|
||||
LARGE_INTEGER waitInterval;
|
||||
waitInterval.QuadPart = retryDelay * -10000;
|
||||
waitInterval.QuadPart = ((LONGLONG)retryDelay) * -10000;
|
||||
|
||||
ASSERT (KeGetCurrentIrql() <= APC_LEVEL);
|
||||
ASSERT (retryDelay > 0 && retryDelay <= timeout);
|
||||
|
Loading…
Reference in New Issue
Block a user