diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 14:00:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 15:30:08 +0200 |
commit | f2c539d3501111f10a2b4e9480ea54c0a3190680 (patch) | |
tree | 1aa39428e2ea41481372436246e7e84c15e6feb0 /libavcodec/g723_1dec.c | |
parent | 69b83f599224932a94d56081d008d373e1e51709 (diff) | |
download | ffmpeg-f2c539d3501111f10a2b4e9480ea54c0a3190680.tar.gz |
avcodec/g723_1dec: Fix LCG type
Fixes: 1567/clusterfuzz-testcase-minimized-5693653555085312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/g723_1dec.c')
-rw-r--r-- | libavcodec/g723_1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c index 89089f5f64..aaa26c24ef 100644 --- a/libavcodec/g723_1dec.c +++ b/libavcodec/g723_1dec.c @@ -488,7 +488,7 @@ static void residual_interp(int16_t *buf, int16_t *out, int lag, (FRAME_LEN - lag) * sizeof(*out)); } else { /* Unvoiced */ for (i = 0; i < FRAME_LEN; i++) { - *rseed = *rseed * 521 + 259; + *rseed = (int16_t)(*rseed * 521 + 259); out[i] = gain * *rseed >> 15; } memset(buf, 0, (FRAME_LEN + PITCH_MAX) * sizeof(*buf)); |