1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00
Vitaly Buka 54bf43052b Avoid calling std::memcmp with nullptr
Summary:
UBSAN complains that this is undefined behavior.

We can assume that empty substring (N==1) always satisfy conditions. So
std::memcmp will be called only only for N > 1 and Str.size() > 0.

Reviewers: ruiu, zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26646

llvm-svn: 286910
2016-11-15 00:01:40 +00:00
..
2016-11-06 07:48:46 +00:00