Skip to content
Snippets Groups Projects
  • Sean McBride's avatar
    3489e4a2
    Encoding: Reformulate to avoid unsigned int overflow · 3489e4a2
    Sean McBride authored and Brad King's avatar Brad King committed
    Playing with clang UBSan unsigned-integer-overflow I found just 2
    warnings in KWSys.
    
    They are not undefined behaviour, but often unintentional.
    
    A reformulation to avoid the overflow was pretty straightforward.
    
    Also noticed and changed `&v[0]` idiom to `v.data()`.
    3489e4a2
    History
    Encoding: Reformulate to avoid unsigned int overflow
    Sean McBride authored and Brad King's avatar Brad King committed
    Playing with clang UBSan unsigned-integer-overflow I found just 2
    warnings in KWSys.
    
    They are not undefined behaviour, but often unintentional.
    
    A reformulation to avoid the overflow was pretty straightforward.
    
    Also noticed and changed `&v[0]` idiom to `v.data()`.