1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

avcodec/h264dec: do not add 0 to the NULL plane pointers when filling a missing field

Not a vulnerability

Fixes: irADzptPLJF2
Found-by: Qiang Li <tjbdlq@gmail.com>
(cherry picked from commit 4a511dc8eb)
Signed-off-by: iceray <iceray000@163.com>
This commit is contained in:
Michael Niedermayer
2026-09-19 22:16:35 +02:00
committed by Marvin Scholz
parent df8dce0eb3
commit ebafaee10a

View File

@@ -948,8 +948,8 @@ static int finalize_frame(H264Context *h, AVFrame *dst, H264Picture *out, int *g
av_log(h->avctx, AV_LOG_DEBUG, "Duplicating field %d to fill missing\n", field);
for (p = 0; p<4; p++) {
dst_data[p] = f->data[p] + (field^1)*f->linesize[p];
src_data[p] = f->data[p] + field *f->linesize[p];
dst_data[p] = FF_PTR_ADD(f->data[p], (field^1)*f->linesize[p]);
src_data[p] = FF_PTR_ADD(f->data[p], field *f->linesize[p]);
linesizes[p] = 2*f->linesize[p];
}