Skip to content

Commit b48ada5

Browse files
committed
fix
1 parent 1a49025 commit b48ada5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/tools/c-index-test/c-index-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3555,7 +3555,7 @@ static CXIdxClientContainer makeClientContainer(CXClientData *client_data,
35553555
clang_indexLoc_getFileLocation(loc, &file, 0, &line, &column, 0);
35563556

35573557
datalen = strlen(name) + digitCount(line) + digitCount(column) + 3;
3558-
node = (IndexDataStringList *)malloc(len + sizeof(IndexDataStringList));
3558+
node = (IndexDataStringList *)malloc(datalen + sizeof(IndexDataStringList));
35593559
assert(node);
35603560
newStr = node->data;
35613561
snprintf(newStr, datalen, "%s:%d:%d", name, line, column);

0 commit comments

Comments
 (0)