diff options
Diffstat (limited to 'source/blender/blenkernel/intern/cryptomatte.cc')
-rw-r--r-- | source/blender/blenkernel/intern/cryptomatte.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc index 6c7b3d82c3b..895f06da5fe 100644 --- a/source/blender/blenkernel/intern/cryptomatte.cc +++ b/source/blender/blenkernel/intern/cryptomatte.cc @@ -433,6 +433,9 @@ static bool from_manifest(CryptomatteLayer &layer, blender::StringRefNull manife } const int quoted_hash_len = quoted_string_len_(ref); + if (quoted_hash_len < 2) { + return false; + } const int hash_len = quoted_hash_len - 2; CryptomatteHash hash = CryptomatteHash::from_hex_encoded(ref.substr(1, hash_len)); ref = ref.drop_prefix(quoted_hash_len); |