On Fri, Dec 04, 2015 at 10:30:23PM +0100, Michael Niedermayer wrote: > ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Fri > Dec 4 21:38:12 2015 +0100| [4f2419888ba49245761f4ab343679c38e7880cfe] | > committer: Michael Niedermayer > > avcodec/pgssubdec: Fix left shift of 255 by 24 places cannot be represented > in type int > > Fixes: > b293a6479bb4b5286cff24d356bfd955/asan_generic_225c3c9_7819_cc526b657450c6cdef1371b526499626.mkv > > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f2419888ba49245761f4ab343679c38e7880cfe > --- > > libavcodec/pgssubdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c > index 61dc2ad..07a2a78 100644 > --- a/libavcodec/pgssubdec.c > +++ b/libavcodec/pgssubdec.c > @@ -33,7 +33,7 @@ > #include "libavutil/imgutils.h" > #include "libavutil/opt.h" > > -#define RGBA(r,g,b,a) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) > +#define RGBA(r,g,b,a) (((unsigned)(a) << 24) | ((r) << 16) | ((g) << 8) | > (b))
I feel like I've seen this fix happen many times. And that specific cases is still lying around at least in 3 other places: windows2linux.h, libzvbi-teletextdec.c and texturedsp.c Maybe it's time to refactor it with MK(BE)TAG etc? This macro is duplicated in like at least 4 files. -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel