diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-28 00:40:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-28 00:40:28 +0200 |
commit | 2aecfd4f209688a8365f18b351f0ecf12fe5f873 (patch) | |
tree | a27bb3f6602ea90f6b13e546a49ea987341a02bc /libavfilter/vf_showinfo.c | |
parent | 0f943ed3c8e5839db61958a59300c866680ece3d (diff) | |
download | ffmpeg-2aecfd4f209688a8365f18b351f0ecf12fe5f873.tar.gz |
vf_showinfo: check return code of av_image_get_linesize()
Fixes CID703716
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_showinfo.c')
-rw-r--r-- | libavfilter/vf_showinfo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 297e8f195f..07b42db765 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -52,10 +52,13 @@ static int end_frame(AVFilterLink *inlink) int i, plane, vsub = desc->log2_chroma_h; for (plane = 0; picref->data[plane] && plane < 4; plane++) { - size_t linesize = av_image_get_linesize(picref->format, picref->video->w, plane); + int64_t linesize = av_image_get_linesize(picref->format, picref->video->w, plane); uint8_t *data = picref->data[plane]; int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h; + if (linesize < 0) + return linesize; + for (i = 0; i < h; i++) { plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize); checksum = av_adler32_update(checksum, data, linesize); |