OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8efaee3
)
avformat/utils: Check bps before using it in a shift in ff_get_pcm_codec_id()
author
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 10 May 2016 22:00:52 +0000
(
00:00
+0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 10 May 2016 22:32:32 +0000
(
00:32
+0200)
Fixes undefined shift
Fixes: usan_shift
Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
52395d4
..
774a2ba
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-2955,6
+2955,9
@@
enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags)
{
+ if (bps > 64U)
+ return AV_CODEC_ID_NONE;
+
if (flt) {
switch (bps) {
case 32: