diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-05-22 22:12:14 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-05-22 22:12:14 +0200 |
commit | 91b461459a5dea7e032d6a16ad18c6b9dc188a2e (patch) | |
tree | 168798e6b8a0da9320edf895c3bd5d2b05d573c9 /libavfilter/vf_lut3d.c | |
parent | 657875b145c788d29b8e3bf38f79264e657932ae (diff) | |
download | ffmpeg-91b461459a5dea7e032d6a16ad18c6b9dc188a2e.tar.gz |
lavfi/lut3d: avoid overread.
Diffstat (limited to 'libavfilter/vf_lut3d.c')
-rw-r--r-- | libavfilter/vf_lut3d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c index 5a9f552638..21206ca5bf 100644 --- a/libavfilter/vf_lut3d.c +++ b/libavfilter/vf_lut3d.c @@ -94,7 +94,7 @@ static inline struct rgbvec lerp(const struct rgbvec *v0, const struct rgbvec *v #define NEAR(x) ((int)((x) + .5)) #define PREV(x) ((int)(x)) -#define NEXT(x) ((int)(x) + 1) +#define NEXT(x) (FFMIN((int)(x) + 1, lut3d->lutsize - 1)) /** * Get the nearest defined point |