From b0c79c69964a473e32e14dd94d5e12e3ff926dcd Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 24 Apr 2020 10:21:11 +0200 Subject: [PATCH] datasets: suppress coverity fp's --- src/datasets.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/datasets.c b/src/datasets.c index c18ef449f6..68557f3a42 100644 --- a/src/datasets.c +++ b/src/datasets.c @@ -312,6 +312,7 @@ static int DatasetLoadString(Dataset *set) line[strlen(line) - 1] = '\0'; SCLogDebug("line: '%s'", line); + // coverity[alloc_strlen : FALSE] uint8_t decoded[strlen(line)]; uint32_t len = DecodeBase64(decoded, (const uint8_t *)line, strlen(line), 1); if (len == 0) @@ -328,6 +329,7 @@ static int DatasetLoadString(Dataset *set) *r = '\0'; + // coverity[alloc_strlen : FALSE] uint8_t decoded[strlen(line)]; uint32_t len = DecodeBase64(decoded, (const uint8_t *)line, strlen(line), 1); if (len == 0) @@ -1016,6 +1018,7 @@ int DatasetAddSerialized(Dataset *set, const char *string) switch (set->type) { case DATASET_TYPE_STRING: { + // coverity[alloc_strlen : FALSE] uint8_t decoded[strlen(string)]; uint32_t len = DecodeBase64(decoded, (const uint8_t *)string, strlen(string), 1); if (len == 0) { @@ -1097,6 +1100,7 @@ int DatasetRemoveSerialized(Dataset *set, const char *string) switch (set->type) { case DATASET_TYPE_STRING: { + // coverity[alloc_strlen : FALSE] uint8_t decoded[strlen(string)]; uint32_t len = DecodeBase64(decoded, (const uint8_t *)string, strlen(string), 1); if (len == 0) {