Mercurial > libavcodec.hg
diff imgresample.c @ 2422:18b8b2dcc037 libavcodec
various security fixes and precautionary checks
| author | michael |
|---|---|
| date | Wed, 12 Jan 2005 00:16:25 +0000 |
| parents | 17ec73c65748 |
| children | 87b7fbed8609 |
line wrap: on
line diff
--- a/imgresample.c Tue Jan 11 08:16:04 2005 +0000 +++ b/imgresample.c Wed Jan 12 00:16:25 2005 +0000 @@ -561,6 +561,8 @@ 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;
