by astrange · 11y ago · 0 comments
Doesn't google's C code style require using signed ints for lengths?
https://google-styleguide.googlecode.com/svn/trunk/cppguide....
As it should - it's inappropriate to use unsigned types for length because the overflow and underflow behaviors are defined, since they're not defined to what you want. When you have ubsan around, adding defined behavior you don't need just adds places to hide bugs.