Suppress two flawfinder false positives

This commit is contained in:
Marcus Holland-Moritz 2021-11-06 14:18:34 +01:00
parent 8e55cf3020
commit f760286dab
2 changed files with 3 additions and 1 deletions

View File

@ -164,6 +164,8 @@ class filesystem_extractor_ final : public filesystem_extractor::impl {
std::array<char, 1024> buf;
for (;;) {
// This is fine, we're simply reusing the buffer.
// Flawfinder: ignore
auto rv = ::read(fd, buf.data(), buf.size());
if (rv <= 0) {

View File

@ -1178,7 +1178,7 @@ metadata_<LoggerPolicy>::find(const char* path) const {
while (*path) {
const char* next = ::strchr(path, '/');
size_t clen = next ? next - path : ::strlen(path);
size_t clen = next ? next - path : ::strlen(path); // Flawfinder: ignore
iv = find(make_directory_view(*iv), std::string_view(path, clen));