1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-19 02:56:07 -05: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
+1 -1
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