aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2025-03-03 09:44:14 +0100
committerGitHub <noreply@github.com>2025-03-03 09:44:14 +0100
commitda046e71d9cfdfc0e143b6be0e496fddb9c6bab9 (patch)
tree82725ec1aa7ef69ed920c389d9d33b7423071373 /src
parent8152dc452dd986bac387daf6b221289b8b315451 (diff)
parent4db2b41807c69f5fd145dd9d523489793a43ef5c (diff)
Merge pull request #379 from pionere/invparHEADmaster
ensure lasterror is set when SCompDecompress2 fails
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)