boostorg / xpressive

Boost.org xpressive module
http://boost.org/libs/xpressive
17 stars 39 forks source link

Avoid advancing null pointers, which is UB #13

Closed Lastique closed 4 years ago

Lastique commented 4 years ago

Advancing a null pointer by a distance other than 0 is UB in C++20 (7.6.6 Additive operators [expr.add]/4).

This issue is reported by clang 10 UBSan here:

https://travis-ci.org/github/boostorg/log/jobs/683550541#L1204

Also, add a missing include for std::size_t.

ericniebler commented 4 years ago

Thanks.

Lastique commented 4 years ago

Please, merge to master.

Lastique commented 4 years ago

Ping? The 1.74 release is approaching.