Re: [FFmpeg-devel] [PATCH] avcodec/flacdec: Avoid undefined shift in error case

2021-03-13 Thread Michael Niedermayer
On Tue, Mar 09, 2021 at 09:04:45PM +0100, Michael Niedermayer wrote:
> Fixes: flac_1040988
> 
> Reported-by: Thomas Guilbert 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/flacdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.


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".

[FFmpeg-devel] [PATCH] avcodec/flacdec: Avoid undefined shift in error case

2021-03-09 Thread Michael Niedermayer
Fixes: flac_1040988

Reported-by: Thomas Guilbert 
Signed-off-by: Michael Niedermayer 
---
 libavcodec/flacdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index cf6128f897..9e55bc1361 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -262,7 +262,7 @@ static int decode_residuals(FLACContext *s, int32_t 
*decoded, int pred_order)
 } else {
 int real_limit = tmp ? (INT_MAX >> tmp) + 2 : INT_MAX;
 for (; i < samples; i++) {
-int v = get_sr_golomb_flac(&gb, tmp, real_limit, 0);
+int v = get_sr_golomb_flac(&gb, tmp, real_limit, 1);
 if (v == 0x8000){
 av_log(s->avctx, AV_LOG_ERROR, "invalid residual\n");
 return AVERROR_INVALIDDATA;
-- 
2.17.1

___
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".