VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/BootEncryption.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-08-15 00:47:11 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-08-15 14:44:34 +0200
commitc2b69b248c004e097ffc1aa4c0dde0ddd0ba54f7 (patch)
tree4ee8316df5e409493c3db3a81f3f2117551330e3 /src/Common/BootEncryption.cpp
parent6cdcbac305bb34b90d0864879ce940463fae9730 (diff)
downloadVeraCrypt-c2b69b248c004e097ffc1aa4c0dde0ddd0ba54f7.tar.gz
VeraCrypt-c2b69b248c004e097ffc1aa4c0dde0ddd0ba54f7.zip
Windows: Add various checks and replace STL code after Coverity report
Diffstat (limited to 'src/Common/BootEncryption.cpp')
-rw-r--r--src/Common/BootEncryption.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp
index 8034d865..c3c54d09 100644
--- a/src/Common/BootEncryption.cpp
+++ b/src/Common/BootEncryption.cpp
@@ -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