Anton Khirnov [Thu, 28 Mar 2013 09:09:36 +0000 (10:09 +0100)]
bmv: check for len being valid in bmv_decode_frame().
It can be 0 or -1 for invalid files, which may result in invalid memory
access.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit
b88f902125ee808c8366e9dcb3f21e4c227483fc)
Conflicts:
libavcodec/bmv.c
Anton Khirnov [Thu, 28 Mar 2013 09:34:47 +0000 (10:34 +0100)]
xmv: do not leak memory in the error paths in xmv_read_header()
CC: libav-stable@libav.org
(cherry picked from commit
f8080bd13b5f7fc48204b17fa59a5ce9feb15f07)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Sun, 17 Mar 2013 15:14:58 +0000 (16:14 +0100)]
avfiltergraph: check for sws opts being non-NULL before using them.
Avoid snprintfing a NULL pointer.
CC: libav-stable@libav.org
(cherry picked from commit
6e3c13a559e9ff300b5ca60e1d503e594d7f055c)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Sat, 30 Mar 2013 08:46:06 +0000 (09:46 +0100)]
oma: Validate sample rates
The sample rate index is 3 bits even if currently index 5, 6 and 7 are
not supported.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit
0933fd1533560fbc718026e12f19a4824b041237)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Reinhard Tartler [Wed, 24 Apr 2013 19:01:00 +0000 (21:01 +0200)]
Prepare for 0.8.7 Release
Reinhard Tartler [Sat, 23 Mar 2013 13:48:40 +0000 (14:48 +0100)]
update Changelog
Reinhard Tartler [Sat, 23 Mar 2013 08:43:26 +0000 (09:43 +0100)]
fate: fetch samples that match the release series
The idea is to ensure that 'make fate' always fetches the fate samples
that work with this release.
(cherry picked from commit
a89f68776b2771935a348ce07d0a094ae965acfc)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Ronald S. Bultje [Sun, 24 Jun 2012 10:17:13 +0000 (11:17 +0100)]
dxva2: include dxva.h if found
Apparently, some build environments require dxva.h even for dxva2,
while others lack this header entirely. Including it conditionally
allows building in both cases.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit
fa84506177f0246b30d4ea6a99ee5d419f3e4550)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Kostya Shishkov [Sun, 17 Mar 2013 19:22:19 +0000 (20:22 +0100)]
iff: validate CMAP palette size
Fixes CVE-2013-2495
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
(cherry picked from commit
50c449ac24fbb4c03c15d2e2026cef2204b80385)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
31a77177ff323ef83944c60a8654891213ab6691)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Reinhard Tartler [Sun, 17 Mar 2013 07:25:46 +0000 (08:25 +0100)]
Changelog: document msrle bugfix
Reinhard Tartler [Sun, 17 Mar 2013 07:23:42 +0000 (08:23 +0100)]
Changelog: cosmetics, remove trailing periods and sort
Anton Khirnov [Tue, 29 Jan 2013 11:24:09 +0000 (12:24 +0100)]
msrledec: check bounds before constructing a possibly invalid pointer,
CC:libav-stable@libav.org
(cherry picked from commit
9bd6375d5f16842306dcecde637ffe605acda26b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
b7765d00f911fe0f8fcda21b93a540f27d2ba2f5)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Ronald Bultje [Sat, 31 Mar 2012 17:10:54 +0000 (17:10 +0000)]
msrle: convert MS RLE decoding function to bytestream2.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit
992f71e95dcf57c917531f126ba7499ef9ed87d3)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Reinhard Tartler [Thu, 14 Mar 2013 17:06:41 +0000 (18:06 +0100)]
Update Changelog for the 0.8.6 Release
Anton Khirnov [Wed, 6 Mar 2013 08:58:00 +0000 (09:58 +0100)]
wmaprodec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
(cherry picked from commit
cacad1c058f66558ec727faac3b277d2dee264d4)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
20373a66ec68d958c266f643a7d0e5ec254c0fcc)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 6 Mar 2013 08:41:44 +0000 (09:41 +0100)]
ivi_common: do not call MC for intra frames when dc_transform is unset
CC:libav-stable@libav.org
(cherry picked from commit
3ba40ebb6cc58753dc3746c718203bb31760deba)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
74880e78d83031d612c941a383b810ff0c9d50c6)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 6 Mar 2013 08:15:19 +0000 (09:15 +0100)]
roqvideodec: fix a potential infinite loop in roqvideo_decode_frame().
When there is just 1 byte remanining in the buffer, nothing will be read
and the loop will continue forever. Check that there are at least 8
bytes, which are always read at the beginning.
CC:libav-stable@libav.org
(cherry picked from commit
3e2f200237af977b9253b0aff121eee27bcedb44)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
747fbe0c212b81952bb27ec7b99fa709081e2d63)
Conflicts:
libavcodec/roqvideodec.c
Reinhard Tartler [Thu, 14 Mar 2013 16:55:01 +0000 (17:55 +0100)]
Revert "libmp3lame: use the correct remaining buffer size when flushing"
This reverts commit
5dbb3298b9c1d7beb41c7d3ab19f86d6e027e43d, which was
mistakenly backported.
Xi Wang [Fri, 15 Mar 2013 10:59:22 +0000 (06:59 -0400)]
lzo: fix overflow checking in copy_backptr()
The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.
Remove the check. Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit
ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6)
Conflicts:
libavutil/lzo.c
Xi Wang [Fri, 15 Mar 2013 11:11:47 +0000 (07:11 -0400)]
flacdec: simplify bounds checking in flac_probe()
Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit
8425d693eefbedbb41f91735614d41067695aa37)
Xi Wang [Fri, 15 Mar 2013 10:31:21 +0000 (06:31 -0400)]
atrac3: avoid oversized shifting in decode_bytes()
When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.
(0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))
Avoid oversized shifting.
CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit
eba1ff31304e407db3cefd7532108408f364367b)
Conflicts:
libavcodec/atrac3.c
Anton Khirnov [Fri, 15 Mar 2013 07:54:27 +0000 (08:54 +0100)]
avconv: skip attached files when selecting streams to read from.
Fixes Bug 473 / invalid reads when using -attach.
Mans Rullgard [Fri, 7 Dec 2012 13:53:56 +0000 (13:53 +0000)]
lavf: fix arithmetic overflows in avformat_seek_file()
The values compared here can be more than INT64_MAX apart. Since the
difference is always positive, converting to uint64_t before subtracting
gives the correct result without overflows.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit
91ac403b1316d59b4f43c4ea0f237e24cec2819a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Michael Niedermayer [Wed, 3 Oct 2012 14:06:23 +0000 (16:06 +0200)]
parser: fix large overreads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit
096abfa15052977eed93f0b5e01afd2d47c53c1f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Mans Rullgard [Thu, 26 Apr 2012 13:00:43 +0000 (14:00 +0100)]
dsputil: fix invalid array indexing
Indexing outside an array is invalid and causes errors with
gcc 4.8.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit
0a07f2b346433a9a2677c69c6b29a1a827e39109)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Luca Barbato [Tue, 5 Mar 2013 16:12:35 +0000 (17:12 +0100)]
shorten: use the unsigned type where needed
get_uint returns an unsigned value, use an unsigned to store
blocksize to make sure the comparison logic is correct and report
correctly the error for the channel count not supported.
CC: libav-stable@libav.org
(cherry picked from commit
5cf7c72757779a740e897a97710aac044fe5258c)
(cherry picked from commit
88089eecfd7e604d40d078b4f4206c647cb2e2b4)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/shorten.c
Luca Barbato [Tue, 5 Mar 2013 15:34:16 +0000 (16:34 +0100)]
shorten: report meaningful errors
(cherry picked from commit
4c364eb2b856fc33cf7b42f7c7b979e69fde5f3a)
(cherry picked from commit
0daf1428e82926dc5a8c72a0ff4c93aaa8a84ed9)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Luca Barbato [Tue, 5 Mar 2013 15:11:28 +0000 (16:11 +0100)]
shorten: K&R formatting cosmetics
(cherry picked from commit
a2ad554def214d2d03b7c16f68dc081a8622f9ca)
(cherry picked from commit
97cc2f286f9e3eed1a00034367ebca58cc05ee39)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/shorten.c
Michael Niedermayer [Tue, 5 Mar 2013 14:13:04 +0000 (15:13 +0100)]
shorten: set invalid channels count to 0
Prevent the loop shorten_decode_close from writing and freeing out of
the array boundary.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
(cherry picked from commit
c10da30d8426a1f681d99a780b6e311f7fb4e5c5)
(cherry picked from commit
21d568be179c54a1596d1377b4da7fbe755bfe7f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Luca Barbato [Tue, 12 Mar 2013 17:56:28 +0000 (18:56 +0100)]
matroskadec: request a read buffer for the wav header
Solve an infiniloop.
CC: libav-stable@libav.org
(cherry picked from commit
37cb3b180a1dc3d6f123f68e0806585ebc2578b6)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Luca Barbato [Sun, 10 Mar 2013 01:50:52 +0000 (02:50 +0100)]
h264: check for luma and chroma bit depth being equal
The decoder assumes a single bit depth for all the planes while
the specification allows different bit depths for luma and chroma.
Avoid the possible problems described in CVE-2013-2277
Diego Biurrun [Tue, 6 Mar 2012 17:59:03 +0000 (18:59 +0100)]
vc1: Move init code shared between decoder and parser to common code file.
This fixes standalone compilation of the VC-1 parser.
(cherry picked from commit
3c715383ea7012ac69507e6b9189c98675c77461)
Conflicts:
libavcodec/vc1data.h
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Justin Ruggles [Wed, 16 Jan 2013 22:52:55 +0000 (17:52 -0500)]
libmp3lame: use the correct remaining buffer size when flushing
CC:libav-stable@libav.org
(cherry picked from commit
e984f47873258b600fd88423f40e3cdaad179190)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
b77d9cbbd5050eda75030c8926241af3dbe1a8df)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 6 Mar 2013 08:06:16 +0000 (09:06 +0100)]
xxan: fix invalid memory access in xan_decode_frame_type0()
The loop a few lines below the xan_unpack() call accesses up to
dec_size * 2 bytes into y_buffer, so dec_size must be limited to
buffer_size / 2.
CC:libav-stable@libav.org
(cherry picked from commit
8a49d2bcbe7573bb4b765728b2578fac0d19763f)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
62a657de168cf501acb23d48cc1aa00793dc83f3)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 6 Mar 2013 08:58:00 +0000 (09:58 +0100)]
wmadec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
(cherry picked from commit
ea1136baafb1fe271cb56c3f4d7bff0267e3c70f)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
c1f479e8df24284237c80ad959619fc85e29a26d)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 6 Mar 2013 09:02:50 +0000 (10:02 +0100)]
wmaprodec: return an error, not 0, when the input is too small.
Returning 0 may result in an infinite loop in valid calling programs. A
decoder should never return 0 without producing any output.
CC:libav-stable@libav.org
(cherry picked from commit
4c0080b7e7d501e2720d2a61f5186a18377f9d63)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
60dd8b5733f9ec4919fbc732ace1be8184dde880)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 6 Mar 2013 09:42:51 +0000 (10:42 +0100)]
vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
CC:libav-stable@libav.org
(cherry picked from commit
f86d66bcfa48998b0727aa0d1089a30cbeae0933)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
77cf052e395b1fac8dd181d4f76b0101d1acd625)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Michael Niedermayer [Thu, 10 Jan 2013 23:54:12 +0000 (00:54 +0100)]
vorbisdec: Error on bark_map_size equal to 0.
The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.
CVE-2013-0894
CC: libav-stable@libav.org
Reported-by: Dale Curtis <dalecurtis@chromium.org>
Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit
11dcecfcca0eca1a571792c4fa3c21fb2cfddddc)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit
494ddd377ada76ed555f7a3f49391455daa099c9)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Mans Rullgard [Wed, 15 Aug 2012 23:10:33 +0000 (00:10 +0100)]
configure: clean up Altivec detection
There used to be one test for Altivec intrinsics support and a
separate test to determine which of two possible syntaxes to use
for vector literals. Since 2008, we only support the more common
of these so the split test no longer makes sense.
This combines the tests into one and also changes the hard error on
failure to a warning. The test can reasonably fail if no --cpu flag
is provided (or is provided with an unknown CPU) and the compiler
default target does not support Altivec. Aborting in this case is
probably over-reacting.
Fixes: #464, http://bugs.debian.org/701710
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit
20bcce507aa6b9c866e34eee75d80305109767a8)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Reinhard Tartler [Sun, 17 Feb 2013 08:12:20 +0000 (09:12 +0100)]
Update RELEASE file for 0.8.6
Reinhard Tartler [Sun, 17 Feb 2013 08:11:57 +0000 (09:11 +0100)]
update year to 2013
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Fri, 4 Jan 2013 15:05:51 +0000 (16:05 +0100)]
oggdec: make sure the private parse data is cleaned up
(cherry picked from commit
d894f74762bc95310ba23f804b7ba8dffc8f6646)
Related to CVE-2012-2882
Conflicts:
libavformat/oggdec.h
libavformat/oggparsevorbis.c
Diego Biurrun [Tue, 10 Jul 2012 16:42:13 +0000 (18:42 +0200)]
build: Fix CAF demuxer dependencies
(cherry picked from commit
a519463366238a7ec05d2bb76c4a67f42cf60ece)
Conflicts:
libavcodec/Makefile
Diego Biurrun [Fri, 22 Feb 2013 21:06:37 +0000 (22:06 +0100)]
doc: developer: Allow tabs in the vim configuration for Automake files
While we do not use Automake in libav, this allows our config to be
used more globally without introducing unwanted breakage.
(cherry picked from commit
040c565e51985477a8fa5e42d2ddfb26ebde6608)
Conflicts:
doc/developer.texi
Vicente Jimenez Aguilar [Wed, 20 Feb 2013 01:35:00 +0000 (02:35 +0100)]
doc: filters: Correct BNF FILTER description
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit
b5ad422bf4e671a8b30ce73ad236cd6b49940af9)
Vicente Jimenez Aguilar [Sat, 16 Feb 2013 02:08:36 +0000 (03:08 +0100)]
doc: Fix some obsolete references to av* tools as ff* tools
Signed-off-by: Diego Biurrun <diego@biurrun.de>
CC: libav-stable@libav.org
(cherry picked from commit
202b5f6deb65e405b07b9b5c20f97c8cb925cf49)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Thu, 24 Jan 2013 10:45:27 +0000 (11:45 +0100)]
pthread: set the frame properties from the thread context, not user.
Right now, the frame properties are set from the user-facing
AVCodecContext before it is updated from the thread context, which is
wrong since they may be invalid or obsolete.
Luca Barbato [Mon, 22 Oct 2012 16:50:32 +0000 (18:50 +0200)]
mp3: exit on parsing error in mp_decode_frame
Properly forward mp_decode_layer3 errors, mp_decode_layer1 and
mp_decode_layer2 do not return errors.
Based on a patch by Michael Niedermayer.
(cherry picked from commit
0c03cc68386443f1e96ab6fb358220faf67cd5ff)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Kostya Shishkov [Mon, 14 May 2012 17:33:03 +0000 (19:33 +0200)]
indeo3: initialise pixel planes on allocation
This prevents decoder from reading garbage from it in case of errors later.
(cherry picked from commit
81064a8045028838fd32d18490034c207c8ecc06)
Fixes an invalid read on sample from CVE-2012-2804
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Reinhard Tartler [Sat, 12 Jan 2013 16:21:15 +0000 (17:21 +0100)]
Update Changelog
Janne Grunau [Sat, 12 Jan 2013 16:22:50 +0000 (17:22 +0100)]
h264: check ref_count validity for num_ref_idx_active_override_flag
Fixes segfault in the fuzzed sample bipbop234.ts_s226407.
CC: libav-stable@libav.org
(cherry-picked from commit
6e5cdf26281945ddea3aaf5eca4d127791f23ca8)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Janne Grunau [Wed, 28 Nov 2012 21:17:14 +0000 (22:17 +0100)]
h264: check context state before decoding slice data partitions
Fixes mov_h264_aac__Demo_FlagOfOurFathers.mov.SIGSEGV.4e9.656.
Found-by: Mateusz "j00ru" Jurczyk
CC: libav-stable@libav.org
(cherry-picked from commit
c1fcf563b13051f280db169ba41c6a1b21b25e08)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Fri, 4 Jan 2013 14:44:02 +0000 (15:44 +0100)]
oggdec: free the ogg streams on read_header failure
Plug an annoying memory leak on broken files.
(cherry picked from commit
89b51b570daa80e6e3790fcd449fe61fc5574e07)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit
42bd6d9cf681306d14c92af97a40116fe4eb2522)
Conflicts:
libavformat/oggdec.c
Luca Barbato [Sat, 22 Dec 2012 16:58:24 +0000 (17:58 +0100)]
oggdec: check memory allocation
(cherry picked from commit
ba064ebe48376e199f353ef0b335ed8a39c638c5)
Conflicts:
libavformat/oggdec.c
Dale Curtis [Wed, 7 Mar 2012 22:26:58 +0000 (14:26 -0800)]
Fix uninitialized reads on malformed ogg files.
The ogg decoder wasn't padding the input buffer with the appropriate
FF_INPUT_BUFFER_PADDING_SIZE bytes. Which led to uninitialized reads in
various pieces of parsing code when they thought they had more data than
they actually did.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit
ef0d779706c77ca9007527bd8d41e9400682f4e4)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Martin Storsjö [Mon, 7 Jan 2013 16:39:04 +0000 (18:39 +0200)]
rtsp: Recheck the reordering queue if getting a new packet
If we timed out and consumed a packet from the reordering queue,
but didn't return a packet to the caller, recheck the queue status.
Otherwise, we could end up in an infinite loop, trying to consume
a queued packet that has already been consumed.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit
8729698d50739524665090e083d1bfdf28235724)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Justin Ruggles [Thu, 8 Nov 2012 23:35:49 +0000 (18:35 -0500)]
opt: avoid segfault in av_opt_next() if the class does not have an option list
CC: libav-stable@libav.org
(cherry picked from commit
d02202e08a994c6c80f0256ae756698541b59902)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Justin Ruggles [Sat, 22 Dec 2012 06:21:09 +0000 (01:21 -0500)]
alacdec: do not be too strict about the extradata size
Sometimes the extradata has duplicate atoms, but that shouldn't prevent
decoding. Just ensure that it is at least 36 bytes as a sanity check.
CC: libav-stable@libav.org
(cherry picked from commit
68a04b0ccee66f57516e129dd3ec457fd50b4bec)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Victor Lopez [Wed, 19 Dec 2012 08:12:24 +0000 (09:12 +0100)]
h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles
Fixes bug 396.
CC: libav-stable@libav.org
(cherry picked from commit
1c8bf3bfed5ff5c504c8e3de96188a977f67cce0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Janne Grunau [Sun, 25 Nov 2012 11:56:04 +0000 (12:56 +0100)]
h264: check sps.log2_max_frame_num for validity
Fixes infinite or long taking loop in frame num gap code in
the fuzzed sample bipbop234.ts_s223302.
CC: libav-stable@libav.org
(cherry picked from commit
d7d6efe42b0d2057e67999b96b9a391f533d2333)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Janne Grunau [Wed, 5 Dec 2012 18:56:36 +0000 (19:56 +0100)]
h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
CC: libav-stable@libav.org
(cherry picked from commit
a8cb1746c5b6307b2e820f965a7da8d907893b38)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Mon, 3 Dec 2012 21:53:30 +0000 (22:53 +0100)]
ppc: always use pic for shared libraries
CC: libav-stable@libav.org
(cherry picked from commit
1944d532a8a1c4b12222f0acfeb1153630dbc996)
Conflicts:
configure
Janne Grunau [Wed, 21 Nov 2012 18:41:59 +0000 (19:41 +0100)]
h264: error out on unset current_picture_ptr for h->current_slice > 0
Fixes a segfault with fuzzed sample sample_varPAR_s11622_r001-02.avi.
CC: libav-stable@libav.org
(cherry picked from commit
0b300daad2f5cb59a7c06dde5ac701685e6edf16)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Janne Grunau [Wed, 28 Nov 2012 16:31:35 +0000 (17:31 +0100)]
flashsv: make sure data for zlib priming is available
Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.
CC: libav-stable@libav.org
(cherry picked from commit
3ae69b91668e3d9b65af4007eb5871397cf0b0ab)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Janne Grunau [Fri, 16 Nov 2012 13:31:09 +0000 (14:31 +0100)]
h264: enable low delay only if no delayed frames were seen
Dropping frames is undesirable but that is the only way by which the
decoder could return to low delay mode. Instead emit a warning and
continue with delayed frames.
Fixes a crash in fuzzed sample nasa-8s2.ts_s20033 caused by a larger
than expected has_b_frames value. Low delay keeps getting re-enabled
from a presumely broken SPS.
CC: libav-stable@libav.org
(cherry picked from commit
706acb558a38eba633056773280155d66c2f4b24)
Conflicts:
libavcodec/h264.c
Janne Grunau [Sat, 24 Nov 2012 14:50:03 +0000 (15:50 +0100)]
flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.
CC: libav-stable@libav.org
(cherry picked from commit
5ae72f54532960cb9eae82a1c9e8d505106c022b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Janne Grunau [Fri, 23 Nov 2012 13:05:36 +0000 (14:05 +0100)]
lavf: avoid integer overflow in ff_compute_frame_duration()
Scaling the denominator instead of the numerator if it is too large
loses precision. Fixes an assert caused by a negative frame duration in
the fuzzed sample nasa-8s2.ts_s202310.
CC: libav-stable@libav.org
(cherry picked from commit
7709ce029a7bc101b9ac1ceee607cda10dcb89dc)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Alex Converse [Wed, 12 Dec 2012 01:26:10 +0000 (17:26 -0800)]
aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
Found-by: pawlkt
CC: libav-stable@libav.org
Fixes: CVE-2012-5144
(cherry picked from commit
6d5b0092678b2a95dfe209a207550bd2fe9ef646)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diego Biurrun [Wed, 9 Jan 2013 08:52:48 +0000 (09:52 +0100)]
APIchanges: Fill in missing commit hashes
Diego Biurrun [Mon, 7 Jan 2013 22:50:16 +0000 (23:50 +0100)]
lavf: Bump minor version to distinguish branch and master version numbers
This enables checking for an API version not present in master that
has avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
Luca Barbato [Thu, 13 Dec 2012 15:20:19 +0000 (16:20 +0100)]
vp6: properly fail on unsupported feature
Interlacing is not supported at all and mismanaged down the normal
codepaths causing possible buffer management issues.
Fixes: CVE-2012-2783
(cherry picked from commit
be75fed9755c1285ba084574aff2d7ee0f81110d)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Mon, 22 Oct 2012 17:11:05 +0000 (19:11 +0200)]
mp3: properly forward mp_decode_frame errors
The function can return either a parsing error or a memory management
error.
Fixes: CVE-2012-2797
(cherry picked from commit
9ab0874ea8b6774c6f5470dba2b5b4615a610d0d)
Conflicts:
libavcodec/mpegaudiodec.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Thu, 13 Dec 2012 16:53:31 +0000 (17:53 +0100)]
mpeg12: do not decode extradata more than once.
Fixes CVE-2012-2803.
CC: libav-stable@libav.org
(cherry picked from commit
582368626188c070d4300913c6da5efa4c24cfb2)
Conflicts:
libavcodec/mpeg12.c
Kostya Shishkov [Mon, 14 May 2012 17:45:41 +0000 (19:45 +0200)]
indeo3: when freeing buffers, set pointers referencing them to NULL as well
Related to CVE-2012-2804
(cherry picked from commit
bc00da27010ed9e5dbe47e5b6fae3dcddb999d78)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Kostya Shishkov [Mon, 14 May 2012 17:30:54 +0000 (19:30 +0200)]
indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
Related to CVE-2012-2804
(cherry picked from commit
fc417db3f162d5269c0d22f8e467da4afa67c20a)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Sat, 24 Nov 2012 06:55:42 +0000 (07:55 +0100)]
avconv: fix copying per-stream metadata.
It is handled separately from other types because it uses stream
specifiers and currently that triggers an assert in SET_DICT.
(cherry picked from commit
4632abc7a3a64b23c243b21cae7a08e5af92231e)
Conflicts:
avconv_opt.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Wed, 21 Nov 2012 07:48:47 +0000 (08:48 +0100)]
id3v2: fix reading unsynchronized frames.
Current code would incorrectly process e.g. 'ff 00 ff 00 ff' to
'ff ff ff', while it should be 'ff ff 00 ff'.
Fixes Bug 395.
CC: libav-stable@libav.org
(cherry picked from commit
9ae80e6a9cefcab61e867256ba19ef78a4bfe0cb)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Janne Grunau [Thu, 15 Nov 2012 15:21:41 +0000 (16:21 +0100)]
h264: Fix parameters to ff_er_add_slice() call
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.
(cherry picked from commit
e6160bda98641b7d4f86de15761ad2a962f21a36)
Conflicts:
libavcodec/h264.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diego Biurrun [Thu, 3 Jan 2013 14:30:22 +0000 (15:30 +0100)]
build: fix 'clean' target
This fixes removal of TOOLS as well as HOSTPROGS declared in the
top-level Makefile. The clean target in common.mak needs to be
eval'd since the variables used within are reset for each library.
(cherry picked from commit
395c3feb3bb165af5760d287a9a64344b6269fe2)
Conflicts:
common.mak
library.mak
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diego Biurrun [Sun, 26 Jun 2011 11:52:40 +0000 (13:52 +0200)]
build: Add 'check' target to run all compile and test targets.
(cherry picked from commit
4982e1ddfaff5287e05b95957f3c56901d60b56a)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diego Biurrun [Wed, 25 Jan 2012 13:56:24 +0000 (14:56 +0100)]
Ignore generated aviocat tool.
(cherry picked from commit
50639cbefef8cc9f3df19241be7cf23cde8313b7)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Anton Khirnov [Mon, 22 Oct 2012 20:40:22 +0000 (22:40 +0200)]
avconv: only apply presets when we have an encoder.
Fixes a crash when using a preset with stream copy.
(cherry picked from commit
4e61a38aa038b7027c5ed423635168d463515d24)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Justin Ruggles [Wed, 7 Nov 2012 19:48:28 +0000 (14:48 -0500)]
flacenc: ensure the order is within the min/max range in LPC order search
This fixes use of uninitialized values when the FLAC encoder uses the
2-level, 4-level, and 8-level search methods. Fixes failure of the
fate-flac-24-comp-8 test when run using valgrind.
(cherry picked from commit
3a2731cbd31d0c5681ddbc7c78edd5c53c4d0032)
Conflicts:
libavcodec/flacenc.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Fri, 26 Oct 2012 20:55:04 +0000 (22:55 +0200)]
yuv4mpeg: reject unsupported codecs
The muxer already rejects unsupported pixel formats, reject also
unsupported codecs to prevent dangerous misuses.
(cherry picked from commit
424b1e764263b1493de4c34365ef367ddae856db)
Conflicts:
libavformat/yuv4mpeg.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Sami Pietila [Fri, 12 Oct 2012 14:12:49 +0000 (07:12 -0700)]
vp8: reset loopfilter delta values at keyframes.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit
0bf511d579c7b21f1244eec688abf571ca1235bd)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Fri, 14 Dec 2012 08:55:04 +0000 (09:55 +0100)]
vp56: release frames on error
Fixes CVE-2012-2783
CC: libav-stable@libav.org
(cherry picked from commit
f33b5ba63eee96c9d1c7f0e568169cb0c3694238)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Fri, 14 Dec 2012 07:22:06 +0000 (08:22 +0100)]
vp56: make parse_header return standard error codes
Returning 0 for failure is misleading.
CC: libav-stable@libav.org
(cherry picked from commit
bb675d3ac6d722d5e117ae9042a996b55ca05b1d)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Thu, 13 Dec 2012 18:38:20 +0000 (19:38 +0100)]
ivi_common: check that scan pattern is set before using it.
Fixes CVE-2012-2791.
CC: libav-stable@libav.org
(cherry picked from commit
deabb52ab4c1fdb3dd319f3980b1489a182011f1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Reinhard Tartler [Wed, 2 Jan 2013 19:07:48 +0000 (20:07 +0100)]
Prepare for 0.8.5 Release
Diego Biurrun [Sun, 11 Nov 2012 21:41:46 +0000 (22:41 +0100)]
x86: Require an assembler able to cope with AVX instructions
All modern assemblers have this capability. Older NASM versions
that lack the capability produce code that crashes at runtime,
so it's better to error out during the build process instead.
CC: libav-stable@libav.org
(cherry picked from commit
b8e8a07c6c4df93de92480f5c3a14296a6a2a690)
Conflicts:
configure
Mans Rullgard [Thu, 11 Oct 2012 15:08:22 +0000 (16:08 +0100)]
svq3: replace unsafe pointer casting with intreadwrite macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
Reinhard Tartler [Wed, 17 Oct 2012 22:08:30 +0000 (00:08 +0200)]
Update Changelog for the 0.8.4 Release
Anton Khirnov [Fri, 19 Oct 2012 18:39:27 +0000 (20:39 +0200)]
lavc: remove stats_out from the options table.
Since it is declared as a string AVOption, the generic freeing code
attempts to free it on codec close. Some codecs might have already freed
it elsewhere (or didn't even allocate it with av_malloc() in the first
place), so this might lead to an invalid free.
There is no point in having this field accessible as an AVOption, so
remove it from the options table.
Fixes Bug 380.
CC: libav-stable@libav.org
(cherry picked from commit
b691135d0c6a2b1cca91adadaf457c2989c6a55d)
Conflicts:
libavcodec/options_table.h
Reinhard Tartler [Wed, 17 Oct 2012 21:55:27 +0000 (23:55 +0200)]
Prepare for 0.8.4 Release
Alex Converse [Wed, 19 Sep 2012 18:12:58 +0000 (11:12 -0700)]
tiffenc: Check av_malloc() results.
(cherry picked from commit
b92dfb56d4582633571db18c3d904f8602eaa2a6)
Conflicts:
libavcodec/tiffenc.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Luca Barbato [Fri, 28 Sep 2012 12:38:13 +0000 (14:38 +0200)]
mpegaudiodec: fix short_start calculation
The value should be always 3, as it follows from the specification.
Fix a stack buffer overflow in exponents_from_scale_factors as reported
by asan. Thanks to Dale Curtis for the sample vector.
(cherry picked from commit
97cfa55eea39cef30abe14682c56c1e4e7f6f10d)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Jindřich Makovička [Sat, 29 Sep 2012 09:16:45 +0000 (11:16 +0200)]
h264: avoid stuck buffer pointer in decode_nal_units
When decode_nal_units() previously encountered a NAL_END_SEQUENCE,
and there are some junk bytes left in the input buffer, but no start codes,
buf_index gets stuck 3 bytes before the end of the buffer.
This can trigger an infinite loop in the caller code, eg. in
try_decode_trame(), as avcodec_decode_video() then keeps returning zeroes,
with 3 bytes of the input packet still available.
With this change, the remaining bytes are skipped so the whole packet gets
consumed.
CC:libav-stable@libav.org
Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit
1a8c6917f68f7378465e18f7615762bfd22704c2)
Conflicts:
libavcodec/h264.c
Anton Khirnov [Fri, 5 Oct 2012 12:45:30 +0000 (14:45 +0200)]
vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203.
CC:libav-stable@libav.org
(cherry picked from commit
ba04177eeb690ba4e93ec30fc8eb02f5319f844b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Anton Khirnov [Fri, 5 Oct 2012 13:53:32 +0000 (15:53 +0200)]
yuv4mpeg: return proper error codes.
Fixes Bug 373.
CC:libav-stable@libav.org
(cherry picked from commit
d3a72becc6371563185a509b94f5daf32ddbb485)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Franz Brauße [Fri, 30 Mar 2012 18:40:14 +0000 (14:40 -0400)]
smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit
12cbbbb4abda2de0ea123282ccf7ebee61517f7d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>