|
|
|
@ -323,7 +323,8 @@ static int DatasetLoadString(Dataset *set)
|
|
|
|
|
|
|
|
|
|
// coverity[alloc_strlen : FALSE]
|
|
|
|
|
uint8_t decoded[strlen(line)];
|
|
|
|
|
uint32_t len = DecodeBase64(decoded, (const uint8_t *)line, strlen(line), 1);
|
|
|
|
|
uint32_t len =
|
|
|
|
|
DecodeBase64(decoded, (const uint8_t *)line, strlen(line), BASE64_MODE_STRICT);
|
|
|
|
|
if (len == 0)
|
|
|
|
|
FatalError(SC_ERR_FATAL, "bad base64 encoding %s/%s",
|
|
|
|
|
set->name, set->load);
|
|
|
|
@ -340,7 +341,8 @@ static int DatasetLoadString(Dataset *set)
|
|
|
|
|
|
|
|
|
|
// coverity[alloc_strlen : FALSE]
|
|
|
|
|
uint8_t decoded[strlen(line)];
|
|
|
|
|
uint32_t len = DecodeBase64(decoded, (const uint8_t *)line, strlen(line), 1);
|
|
|
|
|
uint32_t len =
|
|
|
|
|
DecodeBase64(decoded, (const uint8_t *)line, strlen(line), BASE64_MODE_STRICT);
|
|
|
|
|
if (len == 0)
|
|
|
|
|
FatalError(SC_ERR_FATAL, "bad base64 encoding %s/%s",
|
|
|
|
|
set->name, set->load);
|
|
|
|
@ -1142,7 +1144,8 @@ int DatasetAddSerialized(Dataset *set, const char *string)
|
|
|
|
|
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);
|
|
|
|
|
uint32_t len = DecodeBase64(
|
|
|
|
|
decoded, (const uint8_t *)string, strlen(string), BASE64_MODE_STRICT);
|
|
|
|
|
if (len == 0) {
|
|
|
|
|
return -2;
|
|
|
|
|
}
|
|
|
|
@ -1224,7 +1227,8 @@ int DatasetRemoveSerialized(Dataset *set, const char *string)
|
|
|
|
|
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);
|
|
|
|
|
uint32_t len = DecodeBase64(
|
|
|
|
|
decoded, (const uint8_t *)string, strlen(string), BASE64_MODE_STRICT);
|
|
|
|
|
if (len == 0) {
|
|
|
|
|
return -2;
|
|
|
|
|
}
|
|
|
|
|