[FFmpeg-cvslog] avfilter/vf_waveform: fix typos which caused crash
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 11:51:11 2019 +0200| [4f4334bcbcf177739fc0e159683408aeed66edc5] | committer: Paul B Mahol avfilter/vf_waveform: fix typos which caused crash > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f4334bcbcf177739fc0e159683408aeed66edc5 --- libavfilter/vf_waveform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index e6c47bbd29..a209731ae2 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -1348,8 +1348,8 @@ static int name(AVFilterContext *ctx, c0_data += c0_linesize; \ if (!c1_shift_h || (y & c1_shift_h)) \ c1_data += c1_linesize; \ -if (!c1_shift_h || (y & c1_shift_h)) \ -c2_data += c1_linesize; \ +if (!c2_shift_h || (y & c2_shift_h)) \ +c2_data += c2_linesize; \ d0_data += d0_linesize; \ d1_data += d1_linesize; \ d2_data += d2_linesize; \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_edgedetect: check if height is big enough
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 17:23:10 2019 +0200| [ccf4ab8c9aca0aee66bcc2914031a9c97ac0eeb8] | committer: Paul B Mahol avfilter/vf_edgedetect: check if height is big enough Fixes #8260 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccf4ab8c9aca0aee66bcc2914031a9c97ac0eeb8 --- libavfilter/vf_edgedetect.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index a0ddcbbf5c..11a31fa4ff 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -150,7 +150,8 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h, int i, j; memcpy(dst, src, w); dst += dst_linesize; src += src_linesize; -memcpy(dst, src, w); dst += dst_linesize; src += src_linesize; +if (h > 1) +memcpy(dst, src, w); dst += dst_linesize; src += src_linesize; for (j = 2; j < h - 2; j++) { dst[0] = src[0]; dst[1] = src[1]; @@ -180,8 +181,10 @@ static void gaussian_blur(AVFilterContext *ctx, int w, int h, dst += dst_linesize; src += src_linesize; } -memcpy(dst, src, w); dst += dst_linesize; src += src_linesize; -memcpy(dst, src, w); +if (h > 2) +memcpy(dst, src, w); dst += dst_linesize; src += src_linesize; +if (h > 3) +memcpy(dst, src, w); } enum { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_bm3d: fix possible infinite loop
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 18:16:19 2019 +0200| [365083556ea7773604cca90dce729f988899a830] | committer: Paul B Mahol avfilter/vf_bm3d: fix possible infinite loop > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=365083556ea7773604cca90dce729f988899a830 --- libavfilter/vf_bm3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c index 04cc19ccee..3196b63884 100644 --- a/libavfilter/vf_bm3d.c +++ b/libavfilter/vf_bm3d.c @@ -748,7 +748,7 @@ static int filter_frame(AVFilterContext *ctx, AVFrame **out, AVFrame *in, AVFram av_frame_copy_props(*out, in); for (p = 0; p < s->nb_planes; p++) { -const int nb_jobs = FFMIN(s->nb_threads, s->planeheight[p] / s->block_step); +const int nb_jobs = FFMIN(s->nb_threads, s->planeheight[p] / s->block_size); ThreadData td; if (!((1 << p) & s->planes) || ctx->is_disabled) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_bm3d: fix heap-buffer overflows
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 18:10:38 2019 +0200| [0749082eb93ea02fa4b770da86597450cec84054] | committer: Paul B Mahol avfilter/vf_bm3d: fix heap-buffer overflows Fixes #8262 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0749082eb93ea02fa4b770da86597450cec84054 --- libavfilter/vf_bm3d.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c index 75c356728e..04cc19ccee 100644 --- a/libavfilter/vf_bm3d.c +++ b/libavfilter/vf_bm3d.c @@ -706,8 +706,8 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) const int plane = td->plane; const int width = s->planewidth[plane]; const int height = s->planeheight[plane]; -const int block_pos_bottom = height - s->block_size; -const int block_pos_right = width - s->block_size; +const int block_pos_bottom = FFMAX(0, height - s->block_size); +const int block_pos_right = FFMAX(0, width - s->block_size); const int slice_start = (((height + block_step - 1) / block_step) * jobnr / nb_jobs) * block_step; const int slice_end = (jobnr == nb_jobs - 1) ? block_pos_bottom + block_step : (((height + block_step - 1) / block_step) * (jobnr + 1) / nb_jobs) * block_step; @@ -796,8 +796,8 @@ static int config_input(AVFilterLink *inlink) for (i = 0; i < s->nb_threads; i++) { SliceContext *sc = &s->slices[i]; -sc->num = av_calloc(s->planewidth[0] * s->planeheight[0], sizeof(FFTSample)); -sc->den = av_calloc(s->planewidth[0] * s->planeheight[0], sizeof(FFTSample)); +sc->num = av_calloc(FFALIGN(s->planewidth[0], s->block_size) * FFALIGN(s->planeheight[0], s->block_size), sizeof(FFTSample)); +sc->den = av_calloc(FFALIGN(s->planewidth[0], s->block_size) * FFALIGN(s->planeheight[0], s->block_size), sizeof(FFTSample)); if (!sc->num || !sc->den) return AVERROR(ENOMEM); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_convolution: fix undefined behaviour
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 18:37:16 2019 +0200| [99f8d32129dd233d4eb2efa44678a0bc44869f23] | committer: Paul B Mahol avfilter/vf_convolution: fix undefined behaviour Fixes #8263 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99f8d32129dd233d4eb2efa44678a0bc44869f23 --- libavfilter/vf_convolution.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index f29df38a20..d022f1a04a 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -115,10 +115,10 @@ static void filter16_prewitt(uint8_t *dstp, int width, int x; for (x = 0; x < width; x++) { -int suma = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[1][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * -1 + - AV_RN16A(&c[6][2 * x]) * 1 + AV_RN16A(&c[7][2 * x]) * 1 + AV_RN16A(&c[8][2 * x]) * 1; -int sumb = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1 + - AV_RN16A(&c[5][2 * x]) * 1 + AV_RN16A(&c[6][2 * x]) * -1 + AV_RN16A(&c[8][2 * x]) * 1; +float suma = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[1][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * -1 + + AV_RN16A(&c[6][2 * x]) * 1 + AV_RN16A(&c[7][2 * x]) * 1 + AV_RN16A(&c[8][2 * x]) * 1; +float sumb = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1 + + AV_RN16A(&c[5][2 * x]) * 1 + AV_RN16A(&c[6][2 * x]) * -1 + AV_RN16A(&c[8][2 * x]) * 1; dst[x] = av_clip(sqrtf(suma*suma + sumb*sumb) * scale + delta, 0, peak); } @@ -133,8 +133,8 @@ static void filter16_roberts(uint8_t *dstp, int width, int x; for (x = 0; x < width; x++) { -int suma = AV_RN16A(&c[0][2 * x]) * 1 + AV_RN16A(&c[1][2 * x]) * -1; -int sumb = AV_RN16A(&c[4][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1; +float suma = AV_RN16A(&c[0][2 * x]) * 1 + AV_RN16A(&c[1][2 * x]) * -1; +float sumb = AV_RN16A(&c[4][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -1; dst[x] = av_clip(sqrtf(suma*suma + sumb*sumb) * scale + delta, 0, peak); } @@ -149,10 +149,10 @@ static void filter16_sobel(uint8_t *dstp, int width, int x; for (x = 0; x < width; x++) { -int suma = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[1][2 * x]) * -2 + AV_RN16A(&c[2][2 * x]) * -1 + - AV_RN16A(&c[6][2 * x]) * 1 + AV_RN16A(&c[7][2 * x]) * 2 + AV_RN16A(&c[8][2 * x]) * 1; -int sumb = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -2 + - AV_RN16A(&c[5][2 * x]) * 2 + AV_RN16A(&c[6][2 * x]) * -1 + AV_RN16A(&c[8][2 * x]) * 1; +float suma = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[1][2 * x]) * -2 + AV_RN16A(&c[2][2 * x]) * -1 + + AV_RN16A(&c[6][2 * x]) * 1 + AV_RN16A(&c[7][2 * x]) * 2 + AV_RN16A(&c[8][2 * x]) * 1; +float sumb = AV_RN16A(&c[0][2 * x]) * -1 + AV_RN16A(&c[2][2 * x]) * 1 + AV_RN16A(&c[3][2 * x]) * -2 + + AV_RN16A(&c[5][2 * x]) * 2 + AV_RN16A(&c[6][2 * x]) * -1 + AV_RN16A(&c[8][2 * x]) * 1; dst[x] = av_clip(sqrtf(suma*suma + sumb*sumb) * scale + delta, 0, peak); } @@ -169,10 +169,10 @@ static void filter_prewitt(uint8_t *dst, int width, int x; for (x = 0; x < width; x++) { -int suma = c0[x] * -1 + c1[x] * -1 + c2[x] * -1 + - c6[x] * 1 + c7[x] * 1 + c8[x] * 1; -int sumb = c0[x] * -1 + c2[x] * 1 + c3[x] * -1 + - c5[x] * 1 + c6[x] * -1 + c8[x] * 1; +float suma = c0[x] * -1 + c1[x] * -1 + c2[x] * -1 + + c6[x] * 1 + c7[x] * 1 + c8[x] * 1; +float sumb = c0[x] * -1 + c2[x] * 1 + c3[x] * -1 + + c5[x] * 1 + c6[x] * -1 + c8[x] * 1; dst[x] = av_clip_uint8(sqrtf(suma*suma + sumb*sumb) * scale + delta); } @@ -186,8 +186,8 @@ static void filter_roberts(uint8_t *dst, int width, int x; for (x = 0; x < width; x++) { -int suma = c[0][x] * 1 + c[1][x] * -1; -int sumb = c[4][x] * 1 + c[3][x] * -1; +float suma = c[0][x] * 1 + c[1][x] * -1; +float sumb = c[4][x] * 1 + c[3][x] * -1; dst[x] = av_clip_uint8(sqrtf(suma*suma + sumb*sumb) * scale + delta); } @@ -204,10 +204,10 @@ static void filter_sobel(uint8_t *dst, int width, int x; for (x = 0; x < width; x++) { -int suma = c0[x] * -1 + c1[x] * -2 + c2[x] * -1 + - c6[x] * 1 + c7[x] * 2 + c8[x] * 1; -int sumb = c0[x] * -1 + c2[x] * 1 + c3[x] * -2 + - c5[x] * 2 + c6[x] * -1 + c8[x] * 1; +float suma = c0[x] * -1 + c1[x] * -2 + c2[x] * -1 + + c6[x] * 1 + c7[x] * 2 + c8[x] * 1; +float sumb = c0[x] * -1 + c2[x] * 1 + c3[x
[FFmpeg-cvslog] avfilter/vf_fieldorder: fix heap-buffer overflow
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 23:10:16 2019 +0200| [07050d7bdc32d82e53ee5bb727f5882323d00dba] | committer: Paul B Mahol avfilter/vf_fieldorder: fix heap-buffer overflow Fixes #8264 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07050d7bdc32d82e53ee5bb727f5882323d00dba --- libavfilter/vf_fieldorder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index ca55ff1f66..5707151f1b 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -108,8 +108,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) s->dst_tff ? "up" : "down"); h = frame->height; for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) { -dst_line_step = out->linesize[plane]; -src_line_step = frame->linesize[plane]; +dst_line_step = out->linesize[plane] * (h > 2); +src_line_step = frame->linesize[plane] * (h > 2); line_size = s->line_size[plane]; dst = out->data[plane]; src = frame->data[plane]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_lenscorrection: fix division by zero
ffmpeg | branch: master | Paul B Mahol | Sun Oct 13 23:28:16 2019 +0200| [19587c9332f5be4f6bc6d7b2b8ef3fd21dfeaa01] | committer: Paul B Mahol avfilter/vf_lenscorrection: fix division by zero Fixes #8265 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19587c9332f5be4f6bc6d7b2b8ef3fd21dfeaa01 --- libavfilter/vf_lenscorrection.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index b5400a2f37..ac3c490821 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -155,10 +155,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) for (plane = 0; plane < rect->nb_planes; ++plane) { int hsub = plane == 1 || plane == 2 ? rect->hsub : 0; int vsub = plane == 1 || plane == 2 ? rect->vsub : 0; -int hdiv = 1 << hsub; -int vdiv = 1 << vsub; -int w = rect->width / hdiv; -int h = rect->height / vdiv; +int w = AV_CEIL_RSHIFT(rect->width, hsub); +int h = AV_CEIL_RSHIFT(rect->height, vsub); int xcenter = rect->cx * w; int ycenter = rect->cy * h; int k1 = rect->k1 * (1<<24); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_libvmaf: fix filtering of >8 bit data
ffmpeg | branch: master | Paul B Mahol | Sat Oct 12 21:41:50 2019 +0200| [e835a9d30263ce16e2621d79ff1be9afd5274a60] | committer: Paul B Mahol avfilter/vf_libvmaf: fix filtering of >8 bit data This is what reference does. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e835a9d30263ce16e2621d79ff1be9afd5274a60 --- libavfilter/vf_libvmaf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c index 249e50c720..ed3a383709 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -110,6 +110,7 @@ FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs); const type *main_ptr = (const type *) s->gmain->data[0]; \ \ float *ptr = ref_data; \ +float factor = 1.f / (1 << (bits - 8)); \ \ int h = s->height; \ int w = s->width; \ @@ -118,7 +119,7 @@ FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs); \ for (i = 0; i < h; i++) { \ for ( j = 0; j < w; j++) { \ -ptr[j] = (float)ref_ptr[j]; \ +ptr[j] = ref_ptr[j] * factor; \ } \ ref_ptr += ref_stride / sizeof(*ref_ptr); \ ptr += stride / sizeof(*ptr); \ @@ -128,7 +129,7 @@ FRAMESYNC_DEFINE_CLASS(libvmaf, LIBVMAFContext, fs); \ for (i = 0; i < h; i++) { \ for (j = 0; j < w; j++) { \ -ptr[j] = (float)main_ptr[j]; \ +ptr[j] = main_ptr[j] * factor; \ } \ main_ptr += main_stride / sizeof(*main_ptr); \ ptr += stride / sizeof(*ptr); \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/Makefile: Fix aiffdec replaygain dependency
ffmpeg | branch: master | Andreas Rheinhardt | Sat Oct 12 06:22:29 2019 +0200| [5056eb351117d7a794cc342130325749305cd4bc] | committer: Michael Niedermayer avformat/Makefile: Fix aiffdec replaygain dependency Forgotten in 6390f52a. Signed-off-by: Andreas Rheinhardt Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5056eb351117d7a794cc342130325749305cd4bc --- libavformat/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index a61d42b721..615156c120 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -82,7 +82,7 @@ OBJS-$(CONFIG_ADX_MUXER) += rawenc.o OBJS-$(CONFIG_AEA_DEMUXER) += aea.o pcm.o OBJS-$(CONFIG_AFC_DEMUXER) += afc.o OBJS-$(CONFIG_AIFF_DEMUXER) += aiffdec.o pcm.o isom.o \ -mov_chan.o +mov_chan.o replaygain.o OBJS-$(CONFIG_AIFF_MUXER)+= aiffenc.o id3v2enc.o OBJS-$(CONFIG_AIX_DEMUXER) += aixdec.o OBJS-$(CONFIG_AMR_DEMUXER) += amr.o ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_geq: Use av_clipd() instead of av_clipf()
ffmpeg | branch: master | Michael Niedermayer | Sat Oct 12 13:46:04 2019 +0200| [c8813b1a984714f0027cabeea2394035df20cf38] | committer: Michael Niedermayer avfilter/vf_geq: Use av_clipd() instead of av_clipf() With floats we cannot represent all 32bit integer dimensions Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8813b1a984714f0027cabeea2394035df20cf38 --- libavfilter/vf_geq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index 91eb9685f9..8b1c7726dc 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -88,8 +88,8 @@ static inline double getpix(void *priv, double x, double y, int plane) if (!src) return 0; -xi = x = av_clipf(x, 0, w - 2); -yi = y = av_clipf(y, 0, h - 2); +xi = x = av_clipd(x, 0, w - 2); +yi = y = av_clipd(y, 0, h - 2); x -= xi; y -= yi; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/wmaprodec: Check that the streams channels do not exceed the overall channels
ffmpeg | branch: master | Michael Niedermayer | Sat Oct 12 18:32:08 2019 +0200| [e418b315ddd0505e707860f8cc8b796ce06f3458] | committer: Michael Niedermayer avcodec/wmaprodec: Check that the streams channels do not exceed the overall channels Fixes: NULL pointer dereference Fixes: 18075/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5708262036471808 Fixes: 18087/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5740627634946048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e418b315ddd0505e707860f8cc8b796ce06f3458 --- libavcodec/wmaprodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 5c18479b3b..41ca792548 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -437,7 +437,7 @@ static av_cold int decode_init(WMAProDecodeCtx *s, AVCodecContext *avctx, int nu av_log(avctx, AV_LOG_ERROR, "invalid number of channels per XMA stream %d\n", s->nb_channels); return AVERROR_INVALIDDATA; -} else if (s->nb_channels > WMAPRO_MAX_CHANNELS) { +} else if (s->nb_channels > WMAPRO_MAX_CHANNELS || s->nb_channels > avctx->channels) { avpriv_request_sample(avctx, "More than %d channels", WMAPRO_MAX_CHANNELS); return AVERROR_PATCHWELCOME; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/mips: Fixed four warnings in vc1dsp
ffmpeg | branch: master | gxw | Sat Oct 12 10:48:19 2019 +0800| [21d19f49b78e76acd17ccbf7e632c570f9cc642e] | committer: Michael Niedermayer avcodec/mips: Fixed four warnings in vc1dsp Change the stride argument to ptrdiff_t in the following functions: ff_put_no_rnd_vc1_chroma_mc8_mmi, ff_put_no_rnd_vc1_chroma_mc4_mmi, ff_avg_no_rnd_vc1_chroma_mc8_mmi, ff_avg_no_rnd_vc1_chroma_mc4_mmi. Reviewed-by: Shiyou Yin Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21d19f49b78e76acd17ccbf7e632c570f9cc642e --- libavcodec/mips/vc1dsp_mips.h | 8 libavcodec/mips/vc1dsp_mmi.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h index 0db85fac94..ad7d46e539 100644 --- a/libavcodec/mips/vc1dsp_mips.h +++ b/libavcodec/mips/vc1dsp_mips.h @@ -180,15 +180,15 @@ void ff_vc1_h_loop_filter16_mmi(uint8_t *src, int stride, int pq); void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y); + ptrdiff_t stride, int h, int x, int y); void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y); + ptrdiff_t stride, int h, int x, int y); void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y); + ptrdiff_t stride, int h, int x, int y); void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y); + ptrdiff_t stride, int h, int x, int y); #endif /* AVCODEC_MIPS_VC1DSP_MIPS_H */ diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c index db314de496..98378683b8 100644 --- a/libavcodec/mips/vc1dsp_mmi.c +++ b/libavcodec/mips/vc1dsp_mmi.c @@ -2241,7 +2241,7 @@ DECLARE_FUNCTION(3, 3) void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y) + ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); const int B = (x) * (8 - y); @@ -2296,7 +2296,7 @@ void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y) + ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); const int B = (x) * (8 - y); @@ -2349,7 +2349,7 @@ void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y) + ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); const int B = (x) * (8 - y); @@ -2407,7 +2407,7 @@ void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, - int stride, int h, int x, int y) + ptrdiff_t stride, int h, int x, int y) { const int A = (8 - x) * (8 - y); const int B = (x) * (8 - y); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".