<div dir="ltr">Hello everyone!<div><br></div><div>I've found strange code in tools/libclang/CIndex.cpp in function clang_tokenize(). Lines </div><div><div>  </div><div>5570*Tokens = (CXToken *)malloc(sizeof(CXToken) * CXTokens.size());</div><div>  memmove(*Tokens, CXTokens.data(), sizeof(CXToken) * CXTokens.size());</div></div><div><br></div><div>seem weird without checking the result of malloc-function invocation. Since malloc() can return null pointer, this value can be used in memmove below. </div><div><br></div><div>The same case I've found in </div><div><br></div></div>