History

avcodec/cfhdenc: Allocate more space

Fixes: Assertion failure Fixes: 68979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5375874714107904

Michael Niedermayer committed 2 years ago

Commit a308d791 parent 6420c1b1 file · +1 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/cfhdenc.c+1−2
@@ -552,7 +552,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 551 unmodified lines
552 width, height * 2);552 width, height * 2);
553 }553 }
554 554
555 ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (2LL * avctx->width * (avctx->height + 15) + 2048LL));555 ret = ff_alloc_packet(avctx, pkt, 256LL + s->planes * (4LL * avctx->width * (avctx->height + 15) + 2048LL));
556 if (ret < 0)556 if (ret < 0)
557 return ret;557 return ret;
558 558
@@ -760,7 +760,6 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 201 unmodified lines
760 } else if (count > 0) {760 } else if (count > 0) {
761 count = put_runcode(pb, count, rb);761 count = put_runcode(pb, count, rb);
762 }762 }
763
764 put_bits(pb, cb[index].size, cb[index].bits);763 put_bits(pb, cb[index].size, cb[index].bits);
765 }764 }
766 765

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t