Skip to content

Commit

Permalink
Revert strcpy updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Jan 22, 2025
1 parent 664771e commit 8363b74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/src/IceStorm/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,10 @@ Parser::getInput(char* buf, size_t& result, size_t maxSize)
}
else
{
strncpy(buf, line, result - 1);
strncat(buf, "\n", 1);
// NOLINTBEGIN(clang-analyzer-security.insecureAPI.strcpy)
strcpy(buf, line);
strcat(buf, "\n");
// NOLINTEND(clang-analyzer-security.insecureAPI.strcpy)
free(line);
}
}
Expand Down Expand Up @@ -464,7 +466,7 @@ Parser::getInput(char* buf, size_t& result, size_t maxSize)
}
else
{
strncpy(buf, line.c_str(), result);
strcpy(buf, line.c_str()); // NOLINT(clang-analyzer-security.insecureAPI.strcpy)
}
#if defined(__APPLE__) || defined(__linux__)
}
Expand Down

0 comments on commit 8363b74

Please sign in to comment.