Page MenuHome

Fix T81340: UBSan: addition of unsigned offset causes overflow
ClosedPublic

Authored by Ankit Meel (ankitm) on Oct 1 2020, 1:14 AM.

Details

Summary

The warning:
runtime error: addition of unsigned offset to 0x61a0000b22d8
overflowed to 0x61a0000b22b8

Fix T81340 (partially)

Diff Detail

Repository
rB Blender

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Oct 1 2020, 1:14 AM
Ankit Meel (ankitm) created this revision.
Campbell Barton (campbellbarton) added inline comments.
source/blender/blenloader/intern/readfile.c
287

Casting to int is fine in this case. As it's just a signed offset of a few bytes, otherwise LGTM.

This revision is now accepted and ready to land.Oct 1 2020, 5:43 AM
Campbell Barton (campbellbarton) retitled this revision from Fix T81340: UBSan: addition of unsigned offset causes oveflow to Fix T81340: UBSan: addition of unsigned offset causes overflow.Oct 1 2020, 5:44 AM
Ankit Meel (ankitm) marked an inline comment as done.
  • Cast to int, not int64_t