Fix several undefined behavior issues noted by UBsan #6319
+241
−188
Merged
Loading