summaryrefslogtreecommitdiff
path: root/libavcodec/imgresample.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-12 00:16:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-12 00:16:25 +0000
commit0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (patch)
tree816c7073739d918ca579171204e6d3caf9977da5 /libavcodec/imgresample.c
parentf14d4e7e21c48967c1a877fa9c4eb9943d2c30f5 (diff)
various security fixes and precautionary checks
Originally committed as revision 3822 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imgresample.c')
-rw-r--r--libavcodec/imgresample.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c
index b4c5f360ad..3b74a82794 100644
--- a/libavcodec/imgresample.c
+++ b/libavcodec/imgresample.c
@@ -561,6 +561,8 @@ ImgReSampleContext *img_resample_full_init(int owidth, int oheight,
s = av_mallocz(sizeof(ImgReSampleContext));
if (!s)
return NULL;
+ if((unsigned)owidth >= UINT_MAX / (LINE_BUF_HEIGHT + NB_TAPS))
+ return NULL;
s->line_buf = av_mallocz(owidth * (LINE_BUF_HEIGHT + NB_TAPS));
if (!s->line_buf)
goto fail;