Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-03-01 17:09:01 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-01 18:37:42 +0300
commit1d9092f632288525780615111883c0a9c8a36900 (patch)
treee56750a96ac331068c53e6dc5f3c461288e687eb
parent6b20ccb753f98e1ac586f257e168eaa575d87c37 (diff)
Fix Crash: Access Unallocated Memory.
-rw-r--r--source/blender/blenkernel/intern/cryptomatte.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc
index 4bdcf845cb3..1f194daf132 100644
--- a/source/blender/blenkernel/intern/cryptomatte.cc
+++ b/source/blender/blenkernel/intern/cryptomatte.cc
@@ -253,6 +253,9 @@ constexpr StringRef WHITESPACES = " \t\n\v\f\r";
static constexpr blender::StringRef skip_whitespaces_(blender::StringRef ref)
{
size_t skip = ref.find_first_not_of(WHITESPACES);
+ if (skip == blender::StringRef::not_found) {
+ return ref;
+ }
return ref.drop_prefix(skip);
}