search for: createdup

Displaying 1 result from an estimated 1 matches for "createdup".

Did you mean: createdump
2015 Jul 29
1
[LLVMdev] Clang: strange malloc usage
...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 leads to segmentation fault. The same case can be found in tools/libclang/CXString.cpp file in function createDup: char *Spelling = static_cast<char *>(malloc(String.size() + 1)); memmove(Spelling, String.data(), String.size()); Could somebody clarify me if I'm wrong? Thanks, Valeriy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipe...