[SCM] libav/experimental: Add missing checks on invalid pixel format in av_image_fill_linesizes/pointers.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:15:31 UTC 2013
The following commit has been merged in the experimental branch:
commit 6950cca97fed890ec56259a2f868f37b65513d92
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date: Tue Sep 7 23:41:18 2010 +0000
Add missing checks on invalid pixel format in
av_image_fill_linesizes/pointers.
Originally committed as revision 25072 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcore/imgutils.c b/libavcore/imgutils.c
index a2e913b..0a21f6d 100644
--- a/libavcore/imgutils.c
+++ b/libavcore/imgutils.c
@@ -66,7 +66,7 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt
memset(linesizes, 0, 4*sizeof(linesizes[0]));
- if (desc->flags & PIX_FMT_HWACCEL)
+ if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL)
return AVERROR(EINVAL);
if (desc->flags & PIX_FMT_BITSTREAM) {
@@ -93,7 +93,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh
memset(size , 0, sizeof(size));
memset(has_plane, 0, sizeof(has_plane));
- if (desc->flags & PIX_FMT_HWACCEL)
+ if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL)
return AVERROR(EINVAL);
data[0] = ptr;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list