Skip to content
  • Sean McBride's avatar
    Eliminated (undefined) signed integer overflow · e29cc816
    Sean McBride authored
    clang ubsan warned running some of the 'EnSightBlow' tests:
    
    IO/EnSight/vtkEnSight6BinaryReader.cxx:2823:15: runtime error: signed integer overflow: -1358823424 * 4 cannot be represented in type 'int'
    
    I just upcast to 64 bit so that the multiplication doesn't overflow.
    The tests now pass with the ubsan check.
    
    I have subtly changed the behaviour here, but believe the
    intent is preserved.
    
    Change-Id: I0a35789c169204f04d2a683a029e992e9b20ca65
    e29cc816