diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-07-08 01:49:04 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-07-08 02:32:04 +0300 |
commit | b8c438e7623644edcfdb508c946a723a3b79b893 (patch) | |
tree | bd8c623c77dcd0387bc6c52d16dd2e689b389614 /libavcodec/videodsp_template.c | |
parent | 42e7a5b3c704985c2c18970cc94a837b413df9d9 (diff) |
videodsp: assert that linesize is larger than width
Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/videodsp_template.c')
-rw-r--r-- | libavcodec/videodsp_template.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/videodsp_template.c b/libavcodec/videodsp_template.c index c569c30d60..94c1b7188d 100644 --- a/libavcodec/videodsp_template.c +++ b/libavcodec/videodsp_template.c @@ -32,6 +32,8 @@ void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src, if (!w || !h) return; + av_assert2(block_w * sizeof(pixel) <= FFABS(buf_linesize)); + if (src_y >= h) { src -= src_y * src_linesize; src += (h - 1) * src_linesize; |