summaryrefslogtreecommitdiff
path: root/library/ShadowCopy/shadow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/ShadowCopy/shadow.cpp')
-rw-r--r--library/ShadowCopy/shadow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/ShadowCopy/shadow.cpp b/library/ShadowCopy/shadow.cpp
index cbc4b085..0693815f 100644
--- a/library/ShadowCopy/shadow.cpp
+++ b/library/ShadowCopy/shadow.cpp
@@ -28,6 +28,7 @@ void writeString(const wchar_t* input, wchar_t* output, unsigned int outputBuffe
{
const size_t newSize = min(wcslen(input) + 1, outputBufferLen); //including null-termination
memcpy(output, input, newSize * sizeof(wchar_t));
+ output[newSize-1] = 0; //if output buffer is too small...
}
bgstack15