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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-18 02:58:54 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-18 03:01:17 +0300
commit27dff3fbc1e74aa6613d68a0d9f9b0096fc86f6e (patch)
tree91c4fb3bbe944a4f9e0e6d72a25d12310872f849 /source/blender/blenkernel/BKE_main.h
parent8400b4b566350bd9d726a07627e74f5a995280da (diff)
parente6df02861e17f75d4dd243776f35208681b78465 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/BKE_main.h')
-rw-r--r--source/blender/blenkernel/BKE_main.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index faa91fd4f79..79f56cf25ef 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -147,7 +147,8 @@ typedef struct Main {
#define BLEN_THUMB_SIZE 128
-#define BLEN_THUMB_MEMSIZE(_x, _y) (sizeof(BlendThumbnail) + (size_t)((_x) * (_y)) * sizeof(int))
+#define BLEN_THUMB_MEMSIZE(_x, _y) (sizeof(BlendThumbnail) + ((size_t)(_x) * (size_t)(_y)) * sizeof(int))
+#define BLEN_THUMB_SAFE_MEMSIZE(_x, _y) ((uint64_t)_x * (uint64_t)_y < (SIZE_MAX / (sizeof(int) * 4)))
#ifdef __cplusplus
}