summaryrefslogtreecommitdiff
path: root/libavcodec/pgssubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-04 21:38:12 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-04 21:39:14 +0100
commit4f2419888ba49245761f4ab343679c38e7880cfe (patch)
tree6f20e9724bceb72b80be9b2cbde29666ab64a8bb /libavcodec/pgssubdec.c
parent1a538a149063a435620e904225c3bd42a51c510a (diff)
downloadffmpeg-4f2419888ba49245761f4ab343679c38e7880cfe.tar.gz
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 <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/pgssubdec.c')
-rw-r--r--libavcodec/pgssubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index 61dc2adf95..07a2a78629 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))
#define MAX_EPOCH_PALETTES 8 // Max 8 allowed per PGS epoch
#define MAX_EPOCH_OBJECTS 64 // Max 64 allowed per PGS epoch
#define MAX_OBJECT_REFS 2 // Max objects per display set