Michael Niedermayer
73ea2a028e
avcodec/wavpack: Fix integer overflow in wv_unpack_stereo()
...
Fixes: runtime error: signed integer overflow: 2080374785 + 2080374784 cannot be represented in type 'int'
Fixes: 2351/clusterfuzz-testcase-minimized-5359403240783872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
24e95f9d4d
avcodec/wavpack: Fix integer overflow
...
Fixes: runtime error: signed integer overflow: 227511904 + 1964113935 cannot be represented in type 'int'
Fixes: 2331/clusterfuzz-testcase-minimized-6182185830711296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
5f89747086
avcodec/wavpack: Fix undefined integer negation
...
Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 2291/clusterfuzz-testcase-minimized-5538453481586688
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
e2bbb95d58
avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - -130689706 cannot be represented in type 'int'
...
Fixes: 2038/clusterfuzz-testcase-minimized-4521466148159488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
8b3e580b7f
avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'
...
Fixes: 1967/clusterfuzz-testcase-minimized-5757031199801344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
a47273c803
avcodec/wavpack: Fix runtime error: signed integer overflow: 2013265955 - -134217694 cannot be represented in type 'int'
...
Fixes: 1922/clusterfuzz-testcase-minimized-5561194112876544
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
4020b009d1
avcodec/wavpack: Check float_shift
...
Fixes: runtime error: shift exponent 40 is too large for 32-bit type 'unsigned int'
Fixes: 1898/clusterfuzz-testcase-minimized-5970744880136192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
d90c5bf105
avcodec/wavpack: Fix runtime error: signed integer overflow: 24 * -2147483648 cannot be represented in type 'int'
...
Fixes: 1894/clusterfuzz-testcase-minimized-4716739789062144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
c51357d206
avcodec/wavpack: Fix runtime error: signed integer overflow: -1386217472 * 4 cannot be represented in type 'int'
...
Fixes: 1853/clusterfuzz-testcase-minimized-5471155626442752
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
ea71a48c7e
avcodec/wavpack: Fix runtime error: left shift of negative value -14778
...
Fixes: 1778/clusterfuzz-testcase-minimized-5128953268273152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
5f91786fc8
avcodec/wavpack: Fix: runtime error: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int'
...
Fixes: 1776/clusterfuzz-testcase-minimized-6191258231898112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
bce362d36c
avcodec/wavpack: Fix runtime error: left shift of negative value -1
...
Fixes: 1807/clusterfuzz-testcase-minimized-6258676199325696
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
3b09d7c264
avcodec/wavpack: Fix multiple runtime error: signed integer overflow: 548 * -2147483648 cannot be represented in type 'int'
...
Fixes: 1659/clusterfuzz-testcase-minimized-5396490639900672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
48f7757749
avcodec/wavpack: Fix runtime error: signed integer overflow: 2147483642 + 512 cannot be represented in type 'int'
...
Fixed: 1453/clusterfuzz-testcase-minimized-5024976874766336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
aaeec1c654
avcodec/wavpack: Fix signed integer overflow: 1285114081 * 2 cannot be represented in type 'int'
...
Fixes: 945/clusterfuzz-testcase-6037937588273152
Fixes: integer overflow
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
fc4f88375b
avcodec/wavpack: Fix invalid shift and integer overflow
...
Fixes: 940/clusterfuzz-testcase-5200378381467648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
423375d4f0
avcodec/wavpack: Check shift
...
Fixes: runtime error: shift exponent 255 is too large for 32-bit type 'unsigned int'
Fixes: 894/clusterfuzz-testcase-4841537823309824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
58e9c7f4a2
avcodec/wavpack: Fix multiple integer overflows
...
Fixes: 839/clusterfuzz-testcase-4871084446842880
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
7cebc5a9cc
avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'
...
Fixes: 822/clusterfuzz-testcase-4873433189974016
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
3016e919d4
avcodec/wavpack: Fix runtime error: left shift of negative value -5
...
Fixes: 729/clusterfuzz-testcase-5154831595470848
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
ba15005132
avcodec/wavpack: Fix runtime error: left shift of negative value -2
...
Fixes: 723/clusterfuzz-testcase-6471394663596032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
d03d386162
avcodec/wavpack: Check bitrate_acc for overflow
...
Fixes: undefined behavior in 717/clusterfuzz-testcase-5434924129583104
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
58f3469cc6
avcodec/wavpack: Fix 280:22: runtime error: left shift of negative value -1
...
Fixes: 653/clusterfuzz-testcase-5773837415219200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
5eb04570f6
avcodec/wavpack: Check post_shift
...
Fixes: runtime error: shift exponent 34 is too large for 32-bit type 'int'
Fixes: 653/clusterfuzz-testcase-5773837415219200
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
12eebb845a
avcodec/wavpacl: Fix runtime error: left shift of negative value -1
...
Fixes: 607/clusterfuzz-testcase-5108792465293312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Alexandra Hájková
e7f24c9ffc
wavpack: Convert to the new bitstream reader
8 years ago
Alexandra Hájková
fa64aea12e
unary: Convert to the new bitstream reader
8 years ago
Michael Niedermayer
c188f358aa
avcodec/wavpack: Treat the first block coding too many channels as an error
...
Fixes memleak
Fixes: 236/8aeebc9ca49b91bf71c114dcefac56c154a3a563
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Diego Biurrun
b668662939
get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
...
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.
Also sort headers into canonical order where appropriate.
9 years ago
Andreas Cadhalpun
fa66237b69
lavc: Use get_bitsz where needed
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Andreas Cadhalpun
43ff4aed26
lavc: use get_bitsz to simplify the code
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Ganesh Ajjanagadde
2cbaa078d1
avcodec: use HAVE_THREADS header guards to silence -Wunused-function
...
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7 ,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Andreas Cadhalpun
d0eff8857c
wavpack: limit extra_bits to 32 and use get_bits_long
...
More than 32 bits can't be stored in an integer and get_bits should not
be used with more than 25 bits.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
10 years ago
Andreas Cadhalpun
f9883a669c
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>
10 years ago
Michael Niedermayer
042260cde4
avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
a59f85d106
wavpack: check number of channels
...
This means container and codec disagree. The codec is supposed to
know better so this could be an error instead.
11 years ago
Christophe Gisquet
11a39bdf53
wavpack: report if there is no bits left
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
28bf111503
avcodec/wavpack: fix () in macros
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
326463893b
avcodec/wavpack: initialize pointers to silence warning about them possibly being uninitialized
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
95953c1cfd
avcodec/wavpack fix *void pointer arithmetic
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
866c44d4b0
avcodec/wavpack: clear remainder of data in case of error in wv_unpack_mono/stereo()
...
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7fd85b654950_4005_because.wv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
82e576046c
avcodec/wavpack: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Anton Khirnov
23a211cbba
lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.
...
Just crccheck prints a warning, crccheck+explode returns an error.
Also document this behavior.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
12 years ago
Paul B Mahol
93f4277714
WavPack encoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
ff0bdf9375
lavc: copy AVCodecContext for threads
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
b94f045b18
wavpack: add missing .\n to entropy error message
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
9684d7f1a2
wavpack: frame multi-threading support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago