Re: [FFmpeg-devel] [PATCH 1/3] avcodec/xsubdec: fix overflow in alpha handling

2019-11-09 Thread Michael Niedermayer
On Thu, Oct 24, 2019 at 12:54:25AM +0200, Michael Niedermayer wrote:
> Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
> Fixes: 
> 18368/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XSUB_fuzzer-5702665442426880
> 
> Found-by: continuous fuzzing process 
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/xsubdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply patchset

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

Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.


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 1/3] avcodec/xsubdec: fix overflow in alpha handling

2019-10-23 Thread Michael Niedermayer
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 
18368/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XSUB_fuzzer-5702665442426880

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

diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 93fd0f4d50..05c4a64ee5 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -130,7 +130,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *data_size,
 ((uint32_t *)sub->rects[0]->data[1])[i] |= 0xff00;
 } else {
 for (i = 0; i < sub->rects[0]->nb_colors; i++)
-((uint32_t *)sub->rects[0]->data[1])[i] |= *buf++ << 24;
+((uint32_t *)sub->rects[0]->data[1])[i] |= (unsigned)*buf++ << 24;
 }
 
 #if FF_API_AVPICTURE
-- 
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".