Skip to content

Encoding: Reformulate to avoid unsigned int overflow

Sean McBride requested to merge seanm/kwsys:ubsan-well-defined into master

Playing with clang UBSan unsigned-integer-overflow I found just 2 warnings in KWSys.

They are not undefined behavior, but often unintentional.

A reformulation to avoid the overflow was pretty straightforward.

Also noticed and changed &v[0] idiom to v.data().

Edited by Brad King

Merge request reports

Loading