aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-05 02:51:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commit58b05f8720ccab83200fa989a4fc7cb3d1db360c (patch)
treef418e1873f1e47f1744b1e7b9a7773775fddbb3f
parent5aa97eb1a6f3f9b4f2621f284818843348da9c0c (diff)
downloadffmpeg-58b05f8720ccab83200fa989a4fc7cb3d1db360c.tar.gz
avcodec/dvdsubdec: Fix runtime error: left shift of 242 by 24 places cannot be represented in type 'int'
Fixes: 1080/clusterfuzz-testcase-5353236754071552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit ce7098b8f2b59c62b5abdb3d74819db75cf67698) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dvdsubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index cea166e131..0c73fb2bbd 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -60,7 +60,7 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *
cb = *ycbcr++;
YUV_TO_RGB1_CCIR(cb, cr);
YUV_TO_RGB2_CCIR(r, g, b, y);
- *rgba++ = (*alpha++ << 24) | (r << 16) | (g << 8) | b;
+ *rgba++ = ((unsigned)*alpha++ << 24) | (r << 16) | (g << 8) | b;
}
}