mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-30 22:50:48 +00:00
tools/target_dec_fuzzer: Do not increase max_pixels
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b29c7bcbf6
commit
ac77c5492f
@ -180,12 +180,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
}
|
||||
|
||||
|
||||
AVCodecContext* ctx = avcodec_alloc_context3(NULL);
|
||||
AVCodecContext* ctx = avcodec_alloc_context3(c);
|
||||
AVCodecContext* parser_avctx = avcodec_alloc_context3(NULL);
|
||||
if (!ctx || !parser_avctx)
|
||||
error("Failed memory allocation");
|
||||
|
||||
ctx->max_pixels = maxpixels_per_frame; //To reduce false positive OOM and hangs
|
||||
if (ctx->max_pixels == 0 || ctx->max_pixels > maxpixels_per_frame)
|
||||
ctx->max_pixels = maxpixels_per_frame; //To reduce false positive OOM and hangs
|
||||
|
||||
if (size > 1024) {
|
||||
GetByteContext gbc;
|
||||
|
Loading…
Reference in New Issue
Block a user