Luca Barbato
b26c9f4e52
vc1: check mb_height validity.
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 43bacd5b7d3d265a77cd29d8abb131057796aecc)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 16:18:19 +02:00
Luca Barbato
937cedd7c0
vc1: check the source buffer in vc1_mc functions
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 090cd0631140ac1a3a795d2adfac5dbf5e381aa2)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/vc1dec.c
2013-08-24 16:17:41 +02:00
Luca Barbato
c5ba226c1b
bink: Bound check the quantization matrix.
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 9991298f2c4d9022ad56057f15d037e18d454157)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 16:14:22 +02:00
Luca Barbato
cb31b6ca72
aac: Check init_get_bits return value
...
Some code paths can call it with invalid length.
CC: libav-stable@libav.org
(cherry picked from commit 71953ebcf94fe4ef316cdad1f276089205dd1d65)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 16:13:56 +02:00
Luca Barbato
b53db58ab7
aac: return meaningful errors
...
(cherry picked from commit 07c52e2c7c60b087fd023cd9771778973def0b33)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 16:13:44 +02:00
Luca Barbato
d0323b6234
aac: K&R formatting cosmetics
...
(cherry picked from commit 6d8629aac13692447b54eac795bf74007ebf8987)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 16:13:19 +02:00
Luca Barbato
116aa30db4
xl: Make sure the width is valid
...
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 16:01:02 +02:00
Luca Barbato
e6cf47ee9e
8bps: Bound-check the input buffer
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit bd7b4da0f4627bb6c4a7c2575da83fe6b261a21c)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/8bps.c
2013-08-24 15:43:13 +02:00
Luca Barbato
f8602ef717
4xm: Reject not a multiple of 16 dimension
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 2f034f255c49050e894ab9b88087c09ebe249f3f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 15:13:01 +02:00
Luca Barbato
a5bdec1c75
alsdec: Clean up error paths
...
Fix at least a memory leak.
CC: libav-stable@libav.org
(cherry picked from commit ca488ad480360dfafcb5766f7bfbb567a0638979)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:18:17 +02:00
Luca Barbato
dcbfba3bb6
alsdec: Fix the clipping range
...
mcc_weightings is only 32 elements.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 70ecc175c7b513a153ac87d1c5d219556ca55070)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:18:08 +02:00
Luca Barbato
068bc633f2
dsicinav: Clip the source size to the expected maximum
...
A packet larger than cin->bitmap_size does not make sense.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit fd8189932147a524fe43532b46baa35e8be92a1b)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:17:39 +02:00
Luca Barbato
95275723ae
dsicinav: Bound-check the source buffer when needed
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit dd0bfc3a6a310e3e3674ce7742672d689a9a0e93)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:17:28 +02:00
Luca Barbato
47cb05d783
dsicinav: K&R formatting cosmetics
...
(cherry picked from commit fcae3ff124ee97c9265e3b93f3d41238b2aee9bd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/dsicinav.c
2013-08-24 12:17:24 +02:00
Luca Barbato
fbbe487b1c
indeo: Sanitize ff_ivi_init_planes fail paths
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 28dda8a691f1c723a4a9365ab85f9625f1330096)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:11:57 +02:00
Martin Storsjö
9680f84a31
ac3dec: Don't consume more data than the actual input packet size
...
This was handled properly in the normal return case at the end
of the function, but not in this special case.
Returning a value larger than the input packet size can cause
problems for certain library users.
Returning the actual input buffer size unconditionally, since
it is not guaranteed that frame_size is set to a sensible
value at this point.
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 8f24c12be7a3b3ea105e67bba9a867fe210a2333)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:11:57 +02:00
Luca Barbato
505415b985
indeo: Reject impossible FRAMETYPE_NULL
...
A frame marked FRAMETYPE_NULL cannot be scalable and requires a
previous frame successfully decoded.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 5b2a29552ca09edd4646b6aa1828b32912b7ab36)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:11:57 +02:00
Luca Barbato
d55f7a174d
indeo: Do not reference mismatched tiles
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit f9e5261cab067be7278f73d515bc9b601eb56202)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:11:57 +02:00
Luca Barbato
cf738340d0
indeo5: return proper error codes
...
(cherry picked from commit b0eeb9d442e4b7e82f6797d74245434ea33110a5)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:11:52 +02:00
Luca Barbato
861526bbd1
indeo: Bound-check before applying motion compensation
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 25a6666f6c07c6ac8449a63d7fbce0dfd29c54cd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:09:02 +02:00
Luca Barbato
7514868cb0
indeo: Bound-check before applying transform
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit dc79685195a45c9b8b17d7b93d118e0aefa45462)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:09:02 +02:00
Luca Barbato
4ec5c35850
indeo4: Validate scantable dimension
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit cd78e934c246d1b2510f8fba0abfe40bb75795f6)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:09:02 +02:00
Luca Barbato
be71990da6
indeo4: Check the quantization matrix index
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 6255ccf7d51c82ab79bf0cd47a921f572dda4489)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:08:59 +02:00
Luca Barbato
99d82a07e7
indeo4: Do not access missing reference MV
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 8435bca087c0e79385763c51de009fd89390b6a5)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:03:47 +02:00
Martin Storsjö
96f9b18497
ac3dec: Increment channel pointers only once per channel
...
If the channel mapping map multiple output channels to one
input channel, we should only increment the actual pointer once.
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 68e57cde68f3da4c557ca15491fda74d1ea6321e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:03:47 +02:00
Luca Barbato
c03533ace2
dca: Respect the current limits in the downmixing capabilities
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 3802833bc1f79775a1547c5e427fed6e92b77e53)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 12:03:43 +02:00
Luca Barbato
423ce8830e
dca: Error out on missing DSYNC
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit f261e508459e28beca59868a878e1519a44bb678)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:51:26 +02:00
Luca Barbato
5e46ad33eb
pcm: always use codec->id instead of codec_id
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit c82da343e635663605bd81c59d872bee3182da73)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:50:52 +02:00
Luca Barbato
cbc1212499
mlpdec: Do not set invalid context in read_restart_header
...
The faulty values rippled further down the codepath causing a
hard-to-track segfault in the assembly code.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit e9d394f3fad7e8fd8fc80e3b33cb045bbaceb446)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/mlpdec.c
2013-08-24 11:49:01 +02:00
Luca Barbato
64867f3cb5
pcx: Do not overread source buffer in pcx_rle_decode
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 3abde1a3b49cf299f2aae4eaae6b6cb5270bdc22)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:45:56 +02:00
Luca Barbato
d6a65735f9
wmavoice: conceal clearly corrupted blocks
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit d14a26edb7c4487df581f11e5c6911dc0e623d08)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:39:15 +02:00
Luca Barbato
c4e2758eec
iff: Do not read over the source buffer
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 7d65e960c72f36b73ae7fe84f8e427d758e61da9)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:38:48 +02:00
Luca Barbato
9f1c3cd5ad
qdm2: Conceal broken samples
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 4ecdb5ed44591aba8a0ddb7d443cace836f761f6)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:34:04 +02:00
Luca Barbato
160910acdb
qdm2: refactor joined stereo support
...
qdm2 does support only two channels. Loop over the run once.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit adadc3f2443d25b375e21e801516ccfd78e0b080)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:33:45 +02:00
Luca Barbato
c02d4c1a98
adpcm: Write the correct number of samples for ima-dk4
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 12576afe206d35231ccd61f9033c5fdab6a11e80)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:33:21 +02:00
Luca Barbato
6d2a92c467
imc: Catch a division by zero
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit bbf6a4aa20bfe3d7869b2218e66063602dfb8aa7)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:32:58 +02:00
Luca Barbato
aa99cb15f6
atrac3: Error on impossible encoding/channel combinations
...
Joint stereo encoded mono is impossible.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 50cf5a7fb78846fc39b3ecdaa896a10bcd74da2a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:32:37 +02:00
Luca Barbato
67a8a1c202
atrac3: set the getbits context the right buffer_end
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 22e76ec635bafdd1d1ec35581a7ac09e69e3c43e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:32:26 +02:00
Luca Barbato
8f3fe7c696
atrac3: fix error handling
...
decode_tonal_components returns a proper AVERROR.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 874c8a17ac9b04fb7ac23d003e54e3662dd23b4e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:32:15 +02:00
Luca Barbato
64bcb5d350
qdm2: check and reset dithering index per channel
...
Checking per subband would have the index exceed the
dithering noise table size.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 744a11c996641888d477a3981d609e79eeb69ea9)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:28:11 +02:00
Luca Barbato
998a0389d3
qdm2: formatting cosmetics
...
Apply the usual style plus drop few unnecessary return at the end
of void functions.
(cherry picked from commit 76efedeadb1f6bf79020c44a71dd0cee13d932ad)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:28:11 +02:00
Luca Barbato
86eec54c94
qdm2: use init_static_data
...
(cherry picked from commit f054e309c58894450a5d18cce9799ef58aab9f14)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:28:11 +02:00
Luca Barbato
fb1823e178
vqavideo: check the version
...
Prevent out of buffer write.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit c4abc9098cacb227dba39bac6aea16b2bceba0d0)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-24 11:28:07 +02:00
Michael Niedermayer
a1ce54ce6a
avcodec/kmvc: fix MV checks
...
Fixes Ticket2813
Fixes regression since 70b5583
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3cd8aaa2b2e78faf039691e1c31ff4f8d94e3bc6)
2013-07-31 02:58:03 +02:00
Paul B Mahol
ef81f55ec7
Revert "pnm: remove nonsense code"
...
Breaks decoding pgms with 255 < maxval < 65535.
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>.
This reverts commit a0348d0966a81a66f3a1bf061576b24d5296b933.
(cherry picked from commit 768e40b451a459fefaceed6b1b3d6e70c93596ac)
2013-07-29 00:00:42 +02:00
Michael Niedermayer
0f84286677
mpeg12dec: avoid reinitialization on PS changes when possible.
...
Fixes Ticket2574
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 970c8df73528659925819dec31c4c8c0887f0321)
Conflicts:
libavcodec/mpeg12dec.c
2013-07-09 00:17:03 +02:00
Michael Niedermayer
25ed0f05fd
libavcodec/x86/mpegvideo: Move mmx functions under HAVE_MMX_INLINE
...
should fix ticket2755
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 707b2135fda3687a6eeb91411f801e437f633f30)
2013-07-07 18:36:43 +02:00
Michael Niedermayer
93fc80f8bf
avcodec/x86/dsputil_init: only use xvid idct for lowres=0
...
Fixes crash
Fixes Ticket2714
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b791a0831b0a027e7ba4eb6961cc0180472ac603)
Conflicts:
libavcodec/x86/dsputil_init.c
2013-07-07 18:32:15 +02:00
Luca Barbato
258eea3f2e
kmvc: Clip pixel position to valid range
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 4e7f0b082d8c4b360312216b9241bec65ff63b35)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-07-06 15:06:31 +02:00
Luca Barbato
1c2bd6fe5f
kmvc: use fixed sized arrays in the context
...
Avoid some boilerplate code to dynamically allocate and then free the
buffers.
(cherry picked from commit 8f689770548c86151071ef976cf9b6998ba21c2a)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/kmvc.c
2013-07-06 15:06:31 +02:00