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
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user