diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-09-06 15:35:55 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-09-06 16:25:41 +0200 |
commit | 6022e0b04f73841dc9bf9bce11a45e3c09e58e36 (patch) | |
tree | b0962c8aa1f00e9657d19508d31078061693b647 | |
parent | 0231df505dc70ac435f2b437d1995ebabd70a66a (diff) | |
download | ffmpeg-6022e0b04f73841dc9bf9bce11a45e3c09e58e36.tar.gz |
avcodec/rpzaenc: fix assertions with very small width/height
-rw-r--r-- | libavcodec/rpzaenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rpzaenc.c b/libavcodec/rpzaenc.c index da9500e424..a399d55c93 100644 --- a/libavcodec/rpzaenc.c +++ b/libavcodec/rpzaenc.c @@ -802,7 +802,7 @@ static int rpza_encode_frame(AVCodecContext *avctx, AVPacket *pkt, { RpzaContext *s = avctx->priv_data; uint8_t *buf; - int ret = ff_alloc_packet(avctx, pkt, 4LL + 6LL * avctx->height * avctx->width); + int ret = ff_alloc_packet(avctx, pkt, 4LL + 6LL * FFMAX(avctx->height, 4) * FFMAX(avctx->width, 4)); if (ret < 0) return ret; |