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:
authorAnkit Meel <ankitjmeel@gmail.com>2020-10-01 09:25:14 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-10-01 11:56:45 +0300
commit63c906e0a7e59152601435bac2d06fb1b6df6592 (patch)
tree197ffb1ea4cd5269714c9df6cc6f57d1816c1fe9 /source/blender/blenloader/intern
parenta4e14c3bfdb7dca037ae17bbd3897ef5d8a409b9 (diff)
Fix T81340: UBSan: addition of unsigned offset causes overflow
The warning: runtime error: addition of unsigned offset to 0x61a0000b22d8 overflowed to 0x61a0000b22b8 Fix T81340 (partially) Reviewed By: campbellbarton Maniphest Tasks: T81340 Differential Revision: https://developer.blender.org/D9063
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index ed35b5c5f8f..1072cd3686e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -284,7 +284,7 @@ typedef struct BHeadN {
struct BHead bhead;
} BHeadN;
-#define BHEADN_FROM_BHEAD(bh) ((BHeadN *)POINTER_OFFSET(bh, -offsetof(BHeadN, bhead)))
+#define BHEADN_FROM_BHEAD(bh) ((BHeadN *)POINTER_OFFSET(bh, -(int)offsetof(BHeadN, bhead)))
/* We could change this in the future, for now it's simplest if only data is delayed
* because ID names are used in lookup tables. */