Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-10-31 01:21:40 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-02-01 00:56:14 +0300
commit35c1e95b41e9a626be39629993eb23dae2f80fd7 (patch)
tree950389cefc842ed86a1cff92401bb4dcc132a918 /libavcodec/xan.c
parent9d4ad2dbfdc770f1cab85a7b176024924303be6b (diff)
avcodec/xan: Improve overlapping check
Fixes: memcpy-param-overlap Fixes: 3612/clusterfuzz-testcase-minimized-6393461273001984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e8fafef1db43ead4eae5a6301ccc300e73aa47da) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 662386af9a..85fa8e7394 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -262,7 +262,7 @@ static inline void xan_wc3_copy_pixel_run(XanContext *s, AVFrame *frame,
prevframe_index = (y + motion_y) * stride + x + motion_x;
prevframe_x = x + motion_x;
- if (prev_palette_plane == palette_plane && FFABS(curframe_index - prevframe_index) < pixel_count) {
+ if (prev_palette_plane == palette_plane && FFABS(motion_x + width*motion_y) < pixel_count) {
avpriv_request_sample(s->avctx, "Overlapping copy");
return ;
}