Skip to content
Commit ac8bc12c authored by Argyrios Kyrtzidis's avatar Argyrios Kyrtzidis
Browse files

Add asserts in StringRef to make sure we avoid undefined behavior:

-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL.
-memcmp should not be called with NULL (even if size is 0)

Patch by Matthieu Monrocq!

llvm-svn: 131747
parent 91f1d247
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment