Re: [FFmpeg-devel] [PATCH 1/5] avcodec/wmaprodec: Check if there is a stream

2019-10-03 Thread Michael Niedermayer
On Thu, Oct 03, 2019 at 08:52:49AM +0200, Paul B Mahol wrote:
> ok

will apply

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/wmaprodec: Check if there is a stream

2019-10-03 Thread Paul B Mahol
ok

On 10/2/19, Michael Niedermayer  wrote:
> Fixes: null pointer dereference
> Fixes: signed integer overflow: 512 * 2147483647 cannot be represented in
> type 'int'
> Fixes:
> 17809/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5634409947987968
>
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/wmaprodec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
> index d0fa974c80..6ce2dd4adb 100644
> --- a/libavcodec/wmaprodec.c
> +++ b/libavcodec/wmaprodec.c
> @@ -1902,7 +1902,9 @@ static av_cold int xma_decode_init(AVCodecContext
> *avctx)
>  }
>
>  /* encoder supports up to 64 streams / 64*2 channels (would have to
> alloc arrays) */
> -if (avctx->channels > XMA_MAX_CHANNELS || s->num_streams >
> XMA_MAX_STREAMS) {
> +if (avctx->channels > XMA_MAX_CHANNELS || s->num_streams >
> XMA_MAX_STREAMS ||
> +s->num_streams <= 0
> +) {
>  avpriv_request_sample(avctx, "More than %d channels in %d streams",
> XMA_MAX_CHANNELS, s->num_streams);
>  return AVERROR_PATCHWELCOME;
>  }
> --
> 2.23.0
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/5] avcodec/wmaprodec: Check if there is a stream

2019-10-02 Thread Michael Niedermayer
Fixes: null pointer dereference
Fixes: signed integer overflow: 512 * 2147483647 cannot be represented in type 
'int'
Fixes: 
17809/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5634409947987968

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
---
 libavcodec/wmaprodec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index d0fa974c80..6ce2dd4adb 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1902,7 +1902,9 @@ static av_cold int xma_decode_init(AVCodecContext *avctx)
 }
 
 /* encoder supports up to 64 streams / 64*2 channels (would have to alloc 
arrays) */
-if (avctx->channels > XMA_MAX_CHANNELS || s->num_streams > 
XMA_MAX_STREAMS) {
+if (avctx->channels > XMA_MAX_CHANNELS || s->num_streams > XMA_MAX_STREAMS 
||
+s->num_streams <= 0
+) {
 avpriv_request_sample(avctx, "More than %d channels in %d streams", 
XMA_MAX_CHANNELS, s->num_streams);
 return AVERROR_PATCHWELCOME;
 }
-- 
2.23.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".