diff options
Diffstat (limited to 'libavcodec/imgresample.c')
-rw-r--r-- | libavcodec/imgresample.c | 2 |
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; |