mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
videodsp: assert that linesize is larger than width
Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
42e7a5b3c7
commit
b8c438e762
@ -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;
|
||||
|
@ -162,6 +162,8 @@ static av_always_inline void emulated_edge_mc(uint8_t *dst, const uint8_t *src,
|
||||
if (!w || !h)
|
||||
return;
|
||||
|
||||
av_assert2(block_w <= FFABS(dst_stride));
|
||||
|
||||
if (src_y >= h) {
|
||||
src -= src_y*src_stride;
|
||||
src_y_add = h - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user