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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-02 14:22:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-02 14:22:49 +0400
commit02fbaede8f33b4acc3421e6d641dfa9359a264da (patch)
tree090e675178c3797ecbd0d7cdfbaf20a268f3e9a4 /source/blender/imbuf/IMB_thumbs.h
parent1357443e48881617462463bf8e9037e4fa487d79 (diff)
workaround [#27203] Crashes with some high-res image thumbnail generation
skip generating thumbs for images over 100mb. also pass string lengths as size_t rather then int for path_util.c functions.
Diffstat (limited to 'source/blender/imbuf/IMB_thumbs.h')
-rw-r--r--source/blender/imbuf/IMB_thumbs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h
index 583a677ebd9..f5e63b73cb1 100644
--- a/source/blender/imbuf/IMB_thumbs.h
+++ b/source/blender/imbuf/IMB_thumbs.h
@@ -59,6 +59,9 @@ typedef enum ThumbSource {
THB_SOURCE_BLEND
} ThumbSource;
+/* dont generate thumbs for images bigger then this (100mb) */
+#define THUMB_SIZE_MAX (100 * 1024*1024)
+
// IB_metadata
/* create thumbnail for file and returns new imbuf for thumbnail */