You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
av_image_copy: check for av_image_get_linesize() failure.
Fixes CID703722 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -276,6 +276,10 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
|
|||||||
for (i = 0; i < planes_nb; i++) {
|
for (i = 0; i < planes_nb; i++) {
|
||||||
int h = height;
|
int h = height;
|
||||||
int bwidth = av_image_get_linesize(pix_fmt, width, i);
|
int bwidth = av_image_get_linesize(pix_fmt, width, i);
|
||||||
|
if (bwidth < 0) {
|
||||||
|
av_log(0, AV_LOG_ERROR, "av_image_get_linesize failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (i == 1 || i == 2) {
|
if (i == 1 || i == 2) {
|
||||||
h= -((-height)>>desc->log2_chroma_h);
|
h= -((-height)>>desc->log2_chroma_h);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user