[FFmpeg-cvslog] r25072 - trunk/libavcore/imgutils.c
stefano
subversion
Wed Sep 8 01:41:19 CEST 2010
Author: stefano
Date: Wed Sep 8 01:41:18 2010
New Revision: 25072
Log:
Add missing checks on invalid pixel format in
av_image_fill_linesizes/pointers.
Modified:
trunk/libavcore/imgutils.c
Modified: trunk/libavcore/imgutils.c
==============================================================================
--- trunk/libavcore/imgutils.c Tue Sep 7 23:29:36 2010 (r25071)
+++ trunk/libavcore/imgutils.c Wed Sep 8 01:41:18 2010 (r25072)
@@ -66,7 +66,7 @@ int av_image_fill_linesizes(int linesize
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
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;
More information about the ffmpeg-cvslog
mailing list