transform/base64: add explicit mode to test

Without any mode setting, the test would take up the mode to be 0 which
used to be the relax mode for base64 decoder in C. However, there was no
code corresponding to that mode and it was never used so nothing
happened when this test was run.

Add an explicit strict mode as per the expectation of the test from its
comments.
pull/11823/head
Shivani Bhardwaj 3 months ago committed by Victor Julien
parent cbb571a61c
commit 86eec116eb

@ -202,9 +202,7 @@ static int DetectTransformFromBase64DecodeTest02(void)
{
const uint8_t *input = (const uint8_t *)"This is Suricata\n";
uint32_t input_len = strlen((char *)input);
SCDetectTransformFromBase64Data b64d = {
.nbytes = input_len,
};
SCDetectTransformFromBase64Data b64d = { .nbytes = input_len, .mode = Base64ModeStrict };
InspectionBuffer buffer;
InspectionBuffer buffer_orig;
InspectionBufferInit(&buffer, input_len);

Loading…
Cancel
Save