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
(from parent 1:
dd3b73f
)
aacdec: fix signed overflows in lcg_random()
author
Mans Rullgard
<mans@mansr.com>
Sat, 24 Nov 2012 13:12:47 +0000
(13:12 +0000)
committer
Mans Rullgard
<mans@mansr.com>
Mon, 26 Nov 2012 13:34:58 +0000
(13:34 +0000)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/aacdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/aacdec.c
b/libavcodec/aacdec.c
index
d2a31ca
..
af17acf
100644
(file)
--- a/
libavcodec/aacdec.c
+++ b/
libavcodec/aacdec.c
@@
-787,7
+787,8
@@
static int decode_audio_specific_config(AACContext *ac,
*/
static av_always_inline int lcg_random(int previous_val)
{
- return previous_val * 1664525 + 1013904223;
+ union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 };
+ return v.s;
}
static av_always_inline void reset_predict_state(PredictorState *ps)