Displaying 1 result from an estimated 1 matches for "b9eeb380".
Did you mean:
73eeb380
2015 Jul 29
1
[LLVMdev] Clang: strange malloc usage
Hello everyone!
I've found weird lines of code in tools/libclang/CIndex.cpp file in clang
sources. Function clang_tokenize holds the following lines:
*Tokens = (CXToken *)malloc(sizeof(CXToken) * CXTokens.size());
memmove(*Tokens, CXTokens.data(), sizeof(CXToken) * CXTokens.size());
Since malloc function can return null pointer and there are no checks for
this case, memmove invocation