commit 19978b3a5b0bea9b139601f40c2e61dcd7cbfafc
parent 1340d301dd8d4273cc60a4c7878800f96080ba08
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 19 Jul 2008 03:59:01 +0000
fix potential memcpy of size -1 -- mega-outch
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/plugins/thumbnailffmpeg/ffmpeg/libavcodec/imgconvert.c b/src/plugins/thumbnailffmpeg/ffmpeg/libavcodec/imgconvert.c
@@ -896,6 +896,8 @@ void av_picture_copy(AVPicture *dst, const AVPicture *src,
for(i = 0; i < pf->nb_channels; i++) {
int w, h;
int bwidth = ff_get_plane_bytewidth(pix_fmt, width, i);
+ if (bwidth < 0)
+ continue; /* unknown pixel type, ignore */
w = width;
h = height;
if (i == 1 || i == 2) {