diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-13 22:51:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-18 17:19:17 +0100 |
commit | 69d64cce8847a039a17128e3eaa301917faf6221 (patch) | |
tree | ea2b5d8496e3cfbe0449369526559e5c288f18e2 /shell | |
parent | 6b26ed763f618a5f4c8fd21be0980a46c907bfe6 (diff) |
-Werror,-Wsizeof-pointer-memaccess
Change-Id: I08d4331e5b2c9d17d16b1415d321c4f38322c251
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index dbb4402dd0c0..819d5a4b0eba 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -418,8 +418,9 @@ SCODE STDMETHODCALLTYPE COooFilter::GetText(ULONG * pcwcBuffer, WCHAR * awcBuffe } // Copy UNICODE characters in chunk buffer to output UNICODE buffer ULONG ulToCopy = min( *pcwcBuffer, m_ulUnicodeBufferLen - m_ulUnicodeCharsRead ); - ZeroMemory(awcBuffer, sizeof(awcBuffer)); wmemcpy( awcBuffer, m_pwsBuffer.c_str() + m_ulUnicodeCharsRead, ulToCopy ); + ZeroMemory( + awcBuffer + ulToCopy, (*pcwcBuffer - ulToCopy) * sizeof (WCHAR)); m_ulUnicodeCharsRead += ulToCopy; *pcwcBuffer = ulToCopy; if ( m_ulUnicodeBufferLen == m_ulUnicodeCharsRead ) |