diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-06-27 20:16:12 +0200 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-06-28 11:29:46 +0200 |
commit | f9883a669c3df05a5c453428e080298c6511a17e (patch) | |
tree | 0305905b58e9744b9f3b7b9516375c6a4f54278d | |
parent | 317be53ca626bc0467aac04245b0d4450e46ef50 (diff) | |
download | ffmpeg-f9883a669c3df05a5c453428e080298c6511a17e.tar.gz |
wavpack: use get_bits_long to read up to 32 bits
get_bits should not be used for more than 25 bits.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavcodec/wavpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index b51a21cc9d..d91b66cf2a 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -155,7 +155,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, if (t >= 2) { if (get_bits_left(gb) < t - 1) goto error; - t = get_bits(gb, t - 1) | (1 << (t - 1)); + t = get_bits_long(gb, t - 1) | (1 << (t - 1)); } else { if (get_bits_left(gb) < 0) goto error; @@ -186,7 +186,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb, } else { if (get_bits_left(gb) < t2 - 1) goto error; - t += get_bits(gb, t2 - 1) | (1 << (t2 - 1)); + t += get_bits_long(gb, t2 - 1) | (1 << (t2 - 1)); } } |