git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4615ff0
)
avcodec/mpegaudioenc_template: Fix integer overflow
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 15 Apr 2014 13:09:57 +0000
(15:09 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 15 Apr 2014 13:09:57 +0000
(15:09 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegaudioenc_template.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpegaudioenc_template.c
b/libavcodec/mpegaudioenc_template.c
index
ec837f3
..
e9571d8
100644
(file)
--- a/
libavcodec/mpegaudioenc_template.c
+++ b/
libavcodec/mpegaudioenc_template.c
@@
-708,7
+708,7
@@
static void encode_frame(MpegAudioContext *s,
q1 += 1 << P;
if (q1 < 0)
q1 = 0;
- q[m] = (
unsigned)(q1 *
steps) >> (P + 1);
+ q[m] = (
q1 * (unsigned)
steps) >> (P + 1);
}
#endif
if (q[m] >= steps)