Suppress more checks

This commit is contained in:
Robert Schulze 2023-09-26 11:01:35 +00:00
parent 9fff447716
commit e4c081652d
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 8 additions and 6 deletions

View File

@ -4,8 +4,10 @@
#include <Storages/MergeTree/ApproximateNearestNeighborIndexesCommon.h>
// NOLINTBEGIN(clang-analyzer-unix.Malloc)
#include <annoylib.h>
#include <kissrandom.h>
// NOLINTEND(clang-analyzer-unix.Malloc)
namespace DB
{

View File

@ -243,27 +243,27 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress
memset(file_name, '\0', file_path_len);
if (path)
{
strcat(file_name, path);
strcat(file_name, "/");
strcat(file_name, path); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
strcat(file_name, "/"); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
}
bool same_name = false;
if (file_info.exec)
{
has_exec = true;
strcat(file_name, name);
strcat(file_name, name); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
}
else
{
if (strcmp(name, input + files_pointer) == 0)
same_name = true;
strcat(file_name, input + files_pointer);
strcat(file_name, input + files_pointer); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
}
files_pointer += le64toh(file_info.name_length);
if (file_info.exec || same_name)
{
strcat(file_name, ".decompressed.XXXXXX");
strcat(file_name, ".decompressed.XXXXXX"); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
int fd = mkstemp(file_name);
if (fd == -1)
{
@ -411,7 +411,7 @@ int main(int/* argc*/, char* argv[])
}
char file_path[strlen(self) + 1];
strcpy(file_path, self);
strcpy(file_path, self); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
char * path = nullptr;
char * name = strrchr(file_path, '/');