[FFmpeg-cvslog] avfilter/vf_v360: Fix NULL pointer use
Michael Niedermayer
git at videolan.org
Thu Jan 23 03:14:40 EET 2025
ffmpeg | branch: release/7.1 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jan 8 03:11:02 2025 +0100| [75385a729f6c4b8a47e4cc1fe4717172982efad2] | committer: Michael Niedermayer
avfilter/vf_v360: Fix NULL pointer use
Fixes: applying zero offset to null pointer
partly Fixes: verysmall.flv
Found-by: Elias Myllymäki <elias.myllymaki04p at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 66e9888bf418984a274beddbc3e87e9f1b8f5077)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=75385a729f6c4b8a47e4cc1fe4717172982efad2
---
libavfilter/vf_v360.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 12e40205ba..4ba389e335 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -4255,8 +4255,8 @@ static int v360_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int16_t *u = r->u[p] + ((j - slice_start) * uv_linesize + i) * elements;
int16_t *v = r->v[p] + ((j - slice_start) * uv_linesize + i) * elements;
int16_t *ker = r->ker[p] + ((j - slice_start) * uv_linesize + i) * elements;
- uint8_t *mask8 = p ? NULL : r->mask + ((j - slice_start) * s->pr_width[0] + i);
- uint16_t *mask16 = p ? NULL : (uint16_t *)r->mask + ((j - slice_start) * s->pr_width[0] + i);
+ uint8_t *mask8 = (p || !r->mask) ? NULL : r->mask + ((j - slice_start) * s->pr_width[0] + i);
+ uint16_t *mask16 = (p || !r->mask) ? NULL : (uint16_t *)r->mask + ((j - slice_start) * s->pr_width[0] + i);
int in_mask, out_mask;
if (s->out_transpose)
More information about the ffmpeg-cvslog
mailing list