mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Add various checks and replace STL code after Coverity report
This commit is contained in:
@@ -811,7 +811,7 @@ namespace VeraCrypt
|
||||
DWORD effectiveSize = min (bytesRead, remainingSize);
|
||||
memcpy (buffer, ReadBuffer, effectiveSize);
|
||||
offset.QuadPart = - ((LONGLONG) bytesRead) + (LONGLONG) effectiveSize;
|
||||
SetFilePointerEx (Handle, offset, NULL, FILE_CURRENT);
|
||||
throw_sys_if (!SetFilePointerEx (Handle, offset, NULL, FILE_CURRENT));
|
||||
return alignedSize + effectiveSize;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user