Files
clang-p2996/llvm/lib/Support/Regex.cpp
Tanmay deca8055d4 Avoid nullptr+0 in Regex (#73071)
A zero-length StringRef can have a null data pointer, which, if passed to the llvm_regex functions which take a pointer+length, but then convert it into a [begin, end) pointer pair can cause a nullptr+0 expression to be evaluated, which is UB. So avoid that by ensuring the data pointer is always non-null, even in the zero-length case.
2023-12-01 11:28:42 -08:00

6.8 KiB