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 <jbakker>2021-03-29 13:14:59 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-29 13:16:39 +0300
commit1ea51570514e5731ca8327f9dafbe6b7515a8142 (patch)
treef0af3d509263f1876ee56abd6502edf044d2ccee
parent35cf34de6d5627e878c88ef8c8a5e89b7c72b3be (diff)
Fix: Cryptomatte Metadata Trimmed to 1024.
When reading metadata from image files the metadata is trimmed to 1024. For cryptomatte the metadata can contain json data and should not be trimmed. Resulting additional checks in the manifest parser for incomplete json data. You could argue to add an exception for cryptomatte, but that would still allows misuse. When the direction of this patch is accepted we should consider removing `maxlen` from `IDP_AssignString` as it doesn't seem to be used anywhere else. Reviewed By: #images_movies, mont29, sergey Differential Revision: https://developer.blender.org/D10825
-rw-r--r--source/blender/imbuf/intern/metadata.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/metadata.c b/source/blender/imbuf/intern/metadata.c
index d8abd3411cb..c016379fe64 100644
--- a/source/blender/imbuf/intern/metadata.c
+++ b/source/blender/imbuf/intern/metadata.c
@@ -38,7 +38,6 @@
#include "IMB_metadata.h"
-#define METADATA_MAX_VALUE_LENGTH 1024
void IMB_metadata_ensure(struct IDProperty **metadata)
{
@@ -99,11 +98,11 @@ void IMB_metadata_set_field(struct IDProperty *metadata, const char *key, const
}
if (prop == NULL) {
- prop = IDP_NewString(value, key, METADATA_MAX_VALUE_LENGTH);
+ prop = IDP_NewString(value, key, 0);
IDP_AddToGroup(metadata, prop);
}
- IDP_AssignString(prop, value, METADATA_MAX_VALUE_LENGTH);
+ IDP_AssignString(prop, value, 0);
}
void IMB_metadata_foreach(struct ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata)