collabora-online/common
Miklos Vajna 33310613cd wsd: fix reading past the end of the clipboard in postProcessCopyPayload()
Add a way to search with an offset in findInVector() and then we can
avoid strstr() which assumes a null-terminated input, which may not be
the case.

	READ of size 55 at 0x606000068a56 thread T8 (docbroker_001)
	    #0 0x55d0d6718a5a in StrstrCheck(void*, char*, char const*, char const*) /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:652:5
	    #1 0x55d0d6718882 in __interceptor_strstr /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:669:5
	    #2 0x55d0d71872c9 in ClientSession::postProcessCopyPayload(std::shared_ptr<Message> const&)::$_4::operator()(std::vector<char, std::allocator<char>>&) const /home/vmiklos/git/collaboraonline/online-23.05-san/wsd/ClientSession.cpp:1631:31

During unit-uno-command.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id42669d912bab4746d9f7d99a192c4c3f1d175f7
2024-01-23 08:38:26 +00:00
..
Authorization.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Authorization.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Clipboard.hpp clipboard - dump saved clipboard state and details. 2024-01-17 09:52:58 +00:00
CommandControl.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
CommandControl.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Common.hpp clipboard - dump saved clipboard state and details. 2024-01-17 09:52:58 +00:00
ConfigUtil.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
ConfigUtil.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Crypto.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Crypto.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
DummyTraceEventEmitter.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
FileUtil.cpp common: fix 0 read size in FileUtil::readFile() 2024-01-22 09:39:38 +00:00
FileUtil.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
JailUtil.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
JailUtil.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
JsonUtil.hpp admin: improve error handling on bad json for updateroutetoken 2024-01-09 14:13:46 +00:00
LangUtil.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Log.cpp add logic to sapwn threads intead of processes 2023-12-18 10:34:10 +00:00
Log.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Message.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
MessageQueue.cpp wsd: clean up unused header includes 2024-01-08 08:38:48 +01:00
MessageQueue.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
MobileApp.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
MobileApp.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Png.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Protocol.cpp wsd: clean up unused header includes 2024-01-08 08:38:48 +01:00
Protocol.hpp wsd: clean up unused header includes 2024-01-08 08:38:48 +01:00
Rectangle.hpp ChildSession - dump much more internal state. 2024-01-18 20:18:56 +00:00
RenderTiles.hpp configure: WASMAPP is now defined for WASM targets 2023-12-09 19:22:24 +00:00
Seccomp.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Seccomp.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Session.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Session.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
SigUtil.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
SigUtil.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Simd.cpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
Simd.hpp spdx: improve machine and human readability of headers. 2023-11-14 19:36:31 +00:00
SpookyV2.cpp common: move "hashSubBuffer" function 2022-05-09 16:40:57 +01:00
SpookyV2.h common: move "hashSubBuffer" function 2022-05-09 16:40:57 +01:00
StateEnum.hpp add and use 'N_ELEMENTS' in lieu of std::size 2023-08-23 12:06:31 +02:00
StringVector.cpp wsd: move tokenizer helpers into StringVector 2022-04-12 07:39:07 -04:00
StringVector.hpp wsd: clean up unused header includes 2024-01-08 08:38:48 +01:00
TraceEvent.cpp Avoid assertion failure if toggling Trace Event generation back and forth 2021-06-30 12:40:08 +03:00
TraceEvent.hpp wsd: some clang-tidy warning fixes 2023-06-30 21:45:40 +02:00
Unit.cpp use isKitInProcess() instead of KIT_IN_PROCESS 2023-12-18 10:34:10 +00:00
Unit.hpp wsd: better newChild unit-test event 2023-07-08 04:19:00 -04:00
Util.cpp wsd: fix reading past the end of the clipboard in postProcessCopyPayload() 2024-01-23 08:38:26 +00:00
Util.hpp wsd: fix reading past the end of the clipboard in postProcessCopyPayload() 2024-01-23 08:38:26 +00:00
security.h use isKitInProcess() instead of KIT_IN_PROCESS 2023-12-18 10:34:10 +00:00