Skip to content
Commit b6708d8e authored by Chandler Carruth's avatar Chandler Carruth
Browse files

[UB] Fix the two ways that we would try to memcpy from a null buffer in

the nested name specifier code.

First, skip the entire thing when the input is empty.

Next, handle the case where we started off with a null buffer and a zero
capacity to skip copying and freeing.

This was found with UBSan.

llvm-svn: 243946
parent d96e8777
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