You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
dds: limit 4 bpp handling to AV_PIX_FMT_PAL8
This fixes NULL pointer dereferencing for formats, where frame->data[1]
is not allocated.
The problem was introduced in commit
257fbc3af4
.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -680,7 +680,7 @@ static int dds_decode(AVCodecContext *avctx, void *data,
|
|||||||
/* Use the decompress function on the texture, one block per thread. */
|
/* Use the decompress function on the texture, one block per thread. */
|
||||||
ctx->tex_data = gbc->buffer;
|
ctx->tex_data = gbc->buffer;
|
||||||
avctx->execute2(avctx, decompress_texture_thread, frame, NULL, ctx->slice_count);
|
avctx->execute2(avctx, decompress_texture_thread, frame, NULL, ctx->slice_count);
|
||||||
} else if (!ctx->paletted && ctx->bpp == 4) {
|
} else if (!ctx->paletted && ctx->bpp == 4 && avctx->pix_fmt == AV_PIX_FMT_PAL8) {
|
||||||
uint8_t *dst = frame->data[0];
|
uint8_t *dst = frame->data[0];
|
||||||
int x, y, i;
|
int x, y, i;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user