detect: do not upgrade base64 decode when fuzzing

As fuzzing will put a very big value, and then
ThreadCtxDoInit will try to allocate it,
ending in out of memory
pull/6810/head
Philippe Antoine 4 years ago committed by Victor Julien
parent ca29d33c69
commit 23fb139e00

@ -233,6 +233,9 @@ static int DetectBase64DecodeSetup(DetectEngineCtx *de_ctx, Signature *s,
data->bytes = BASE64_DECODE_MAX;
}
if (data->bytes > de_ctx->base64_decode_max_len) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
data->bytes = BASE64_DECODE_MAX;
#endif
de_ctx->base64_decode_max_len = data->bytes;
}

Loading…
Cancel
Save