aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SCompression.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/SCompression.cpp b/src/SCompression.cpp
index 086c623..316a7fb 100644
--- a/src/SCompression.cpp
+++ b/src/SCompression.cpp
@@ -1050,7 +1050,10 @@ int WINAPI SCompDecompress2(void * pvOutBuffer, int * pcbOutBuffer, void * pvInB
// Verify buffer sizes
if(*pcbOutBuffer < cbInBuffer || cbInBuffer < 1)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
return 0;
+ }
// If the outputbuffer is as big as input buffer, just copy the block
if(*pcbOutBuffer == cbInBuffer)