1
0
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:
Mounir IDRASSI
2018-08-15 00:47:11 +02:00
parent 6cdcbac305
commit c2b69b248c
3 changed files with 18 additions and 24 deletions

View File

@@ -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