diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-08-04 03:52:56 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-08-04 03:52:56 +0000 |
commit | b6708d8ebf05cb3e09ea0ab495d2d45e0ca997a4 (patch) | |
tree | 49e112612c52c306ca242777d33c21e7aed9d631 /clang/tools/c-index-test/c-index-test.c | |
parent | d96e877788f61ea4cb53e2005cf1016f208dfd9d (diff) | |
download | bcm5719-llvm-b6708d8ebf05cb3e09ea0ab495d2d45e0ca997a4.tar.gz bcm5719-llvm-b6708d8ebf05cb3e09ea0ab495d2d45e0ca997a4.zip |
[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
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
0 files changed, 0 insertions, 0 deletions