49747 Commits

Author SHA1 Message Date
Luca Barbato
694b7cd873 mpegts: Define the section length with a constant
The specification says the value is expressed in 10 bits including
the 4-byte CRC.
2014-08-07 13:30:21 +02:00
Reinhard Tartler
ecda9b90ec Update Changelog for v9.15 2014-08-06 20:07:33 -04:00
Michael Niedermayer
52254067b3 error_concealment: avoid using the picture if not fully setup
Fixes state becoming inconsistent and a null pointer dereference.

CC: libav-stable@libav.org
Bug-Id: CVE-2013-0860
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-06 19:25:56 +00:00
Anton Khirnov
af9b62654d svq1: do not modify the input packet
The input data must remain constant, make a copy instead. This is in
theory a performance hit, but since I failed to find any samples
using this feature, this should not matter in practice.

Also, check the size of the header, avoiding invalid reads on truncated
data.

CC:libav-stable@libav.org
(cherry picked from commit 7b588bb691644e1b3c168b99accf74248a24e3cf)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/svq1dec.c
2014-08-06 19:10:28 +00:00
Anton Khirnov
80c268eaae cdgraphics: do not return 0 from the decode function
0 means no data consumed, so it can trigger an infinite loop in the
caller.

CC:libav-stable@libav.org
(cherry picked from commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/cdgraphics.c
2014-08-06 18:46:36 +00:00
Anton Khirnov
8cd67ddde4 cdgraphics: switch to bytestream2
Fixes possible invalid memory accesses on corrupted data.

CC:libav-stable@libav.org
Bug-ID: CVE-2013-3674
(cherry picked from commit a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-06 18:45:57 +00:00
Michael Niedermayer
c53effc41b huffyuvdec: check width size for yuv422p
Avoid out of array accesses.

CC: libav-stable@libav.org
Bug-Id: CVE-2013-0848
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit a7153444df9040bf6ae103e0bbf6104b66f974cb)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 20:11:08 +00:00
Michael Niedermayer
ede7388800 mmvideo: check horizontal coordinate too
Fixes out of array accesses.

Bug-Id: CVE-2013-3672
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 70cd3b8e659c3522eea5c16a65d14b8658894a94)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 19:28:47 +00:00
Michael Niedermayer
36d8914f1b wmalosslessdec: fix mclms_coeffs* array size
Fixes corruption of context

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
Bug-Id: CVE-2014-2098
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 849b9d34c7ef70b370c53e7af3940f51cbc07d0f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 15:05:22 +00:00
Luca Barbato
146b187113 lavc: Check the image size before calling get_buffer
Bug-Id: CVE-2011-3935
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-08-04 14:15:45 +02:00
Diego Biurrun
43d6764327 huffyuv: Check and propagate function return values
Bug-Id: CVE-2013-0868

inspired by a patch from Michael Niedermayer <michaelni@gmx.at>
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

(cherry picked from commit 744b406ff3474e77543bcf86125a2f7bc7deaa18)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavcodec/huffyuvdec.c
2014-08-03 16:08:59 -07:00
Vittorio Giovara
5123541913 h264: prevent theoretical infinite loop in SEI parsing
Properly address CVE-2011-3946 and parse bitstream as described in the spec.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-08-01 13:36:37 +01:00
Michael Niedermayer
01f9540320 h264_sei: check SEI size
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-01 13:36:37 +01:00
Michael Niedermayer
00915d3cd2 pgssubdec: Check RLE size before copying
Make sure the buffer size does not exceed the expected
RLE size.

Prevent an out of array bound write.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Bug-Id: CVE-2013-0852

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit a1f7844a11010d8552c75424d1a831b37a0ae5d9)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-01 05:12:07 -07:00
Diego Biurrun
58d7b835e3 fate: Add dependencies for dct/fft/mdct/rdft tests
(cherry picked from commit d396987c303bdc4eea7d1a1ff6776475d9bbd9ea)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavcodec/fft-test.c
2014-07-30 12:15:44 -07:00
Bernhard Übelacker
d16515ae5f video4linux2: Avoid a floating point exception
This avoids a segfault in avconv_opt.c:opt_target when trying to
determine the norm.

(cherry picked from commit dc71f1958846bb1d96de43a4603983dc8450cfcc)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-30 12:15:44 -07:00
Diego Biurrun
3a6bc3e381 vf_select: Drop a debug av_log with an unchecked double to enum conversion
CC: libav-stable@libav.org
(cherry picked from commit a8d803a320fb08b3ad5db4fffc79abd401206905)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-30 12:15:44 -07:00
Anton Khirnov
e8ff797206 eamad: use the bytestream2 API instead of AV_RL
This is safer and possibly fixes invalid reads on truncated data.
(cherry-picked from commit 541427ab4d5b4b6f5a90a687a06decdb78e7bc3c)

CC:libav-stable@libav.org

Conflicts:
	libavcodec/eamad.c

(cherry picked from commit f9204ec56a4cf73843d1e5b8563d3584c2c05b47)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-30 11:35:41 -07:00
Reinhard Tartler
3ecbd911ff Update Changelog for v9.14 2014-06-26 21:28:08 -04:00
Reinhard Tartler
5e8eaa26b2 Prepare for 9.14 Release 2014-06-26 21:23:39 -04:00
Martin Storsjö
21d3e0ac9e adpcm: Write the proper predictor in trellis mode in IMA QT
The actual predictor value, set by the trellis code, never
was written back into the variable that was written into
the block header. This was accidentally removed in b304244b.

This significantly improves the audio quality of the trellis
case, which was plain broken since b304244b.

Encoding IMA QT with trellis still actually gives a slightly
worse quality than without trellis, since the trellis encoder
doesn't use the exact same way of rounding as in
adpcm_ima_qt_compress_sample and adpcm_ima_qt_expand_nibble.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0776e0ef6ba4160281ef3fabea43e670f3792b4a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-26 13:43:46 +02:00
Martin Storsjö
744e7eea5d adpcm: Avoid reading out of bounds in the IMA QT trellis encoder
This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals &samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was &samples[avctx->channels + ch], which was correctly
changed into &samples_p[ch][1].

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 3d79d0c93e5b37a35b1b22d6c18699c233aad1ba)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-26 13:43:41 +02:00
Justin Ruggles
d7dbc687e3 Check mp3 header before calling avpriv_mpegaudio_decode_header().
As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.

CC:libav-stable@libav.org
(cherry picked from commit f2f2e7627f0c878d13275af5d166ec5932665e28)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-26 12:52:01 +02:00
Justin Ruggles
7997acee05 Check if an mp3 header is using a reserved sample rate.
Fixes an invalid read past the end of avpriv_mpa_freq_tab.
Fixes divide-by-zero due to sample_rate being set to 0.

Bug-Id: 705

CC:libav-stable@libav.org

Conflicts:
	libavcodec/mpegaudiodecheader.c
2014-06-26 12:51:04 +02:00
Michael Niedermayer
4dfd4399ea Update for FFmpeg 1.1.12
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n1.1.12
2014-06-26 00:13:49 +02:00
Michael Niedermayer
f0d56d4f55 avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 86a9370e2b91d67375e66a06d6eb573b5a017775)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:58 +02:00
Michael Niedermayer
71a4a9183f avcodec/alsdec: Clear MPEG4AudioConfig so that no use of uninitialized memory is possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e6bd5481cf42a9765c492c77754d4633092cece)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:58 +02:00
Michael Niedermayer
80588930ff avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled.
Found-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 74760883fcb4443d105814ed246b3cf51d7e9dca)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:58 +02:00
Michael Niedermayer
bd2266975c avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 19e66c7232d96e4ae8f05b52da2b84dfaa4e4da3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:37 +02:00
Michael Niedermayer
e68114868f avutil/cpu: force mmx on selection of higher x86 SIMD features
Fixes various runtime failures with manually set flags that represent no
existing CPU

Fixes Ticket3653

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6310eb8010b7a3b3016e297132380cbd4e3d2d10)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:37 +02:00
Michael Niedermayer
4533e8b30a avcodec/diracdec: move mc buffer allocation to per frame
Fixes out of array accesses for non default buffers with large strides

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4a30f08505a4e85718896ff233c97be41a9754ca)
(cherry picked from commit 9c9fc79d9237d28e33161cb2e75082d8ad232b2e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:37 +02:00
Michael Niedermayer
a8dd7fe5b9 Merge commit '503322f97c5a25a020933ed4ab510697d5f5b4af' into release/1.1
* commit '503322f97c5a25a020933ed4ab510697d5f5b4af':
  lzo: Handle integer overflow

Conflicts:
	libavutil/lzo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 22:40:30 +02:00
Luca Barbato
503322f97c lzo: Handle integer overflow
get_len can overflow for specially crafted payload.

Reported-By: Don A. Baley <donb@securitymouse.com>
CC: libav-stable@libav.org

(cherry picked from commit ccda51b14c0fcae2fad73a24872dce75a7964996)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-25 14:43:46 +02:00
Michael Niedermayer
574bf2ce4c avutil/lzo: add asserts to be double sure against overflows
These asserts cannot fail since d6af26c55c1ea30f85a7d9edbc373f53be1743ee

Based-on: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cf2b7c01f81c1fb3283a1390c0ca9a2f81f4f4a8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:14:30 +02:00
Michael Niedermayer
1f2f6b247a avutil/lzo: Fix integer overflow
Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)

Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d6af26c55c1ea30f85a7d9edbc373f53be1743ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:14:28 +02:00
Michael Niedermayer
724deeb7a8 Merge commit '4310ba273d3bcb7f19a4e40b55b9e832568e56e5' into release/1.1
* commit '4310ba273d3bcb7f19a4e40b55b9e832568e56e5':
  sgidec: fix an incorrect backport

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 01:26:57 +02:00
Michael Niedermayer
62899d79a3 Merge commit 'ba8ab4e7ae016cf970b0f335a7933f2db53784bc' into release/1.1
* commit 'ba8ab4e7ae016cf970b0f335a7933f2db53784bc':
  avconv: do not send non-monotonous DTS to the muxers.

Conflicts:
	ffmpeg_opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 01:11:54 +02:00
Michael Niedermayer
45283653a3 Merge commit 'e0fcad77618a0455ca9c2451ea0aa538597a08c0' into release/1.1
* commit 'e0fcad77618a0455ca9c2451ea0aa538597a08c0':
  avconv: make -shortest work with streamcopy

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 01:05:46 +02:00
Michael Niedermayer
6af1793dd5 Merge commit '9455a023be9f3915ccf5511a0b8fdb5b8897b2b6' into release/1.1
* commit '9455a023be9f3915ccf5511a0b8fdb5b8897b2b6':
  matroskaenc: do not write negative timestamps

Conflicts:
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

No change to fate as ffmpeg was not affected by these bugs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 00:48:51 +02:00
Sean McGovern
4310ba273d sgidec: fix an incorrect backport
Bug-Id: 691

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-17 21:44:38 +02:00
Anton Khirnov
ba8ab4e7ae avconv: do not send non-monotonous DTS to the muxers.
Hack partially based on a commit by Michael Niedermayer <michaelni@gmx.at>
Should fix (or work around) bug 458.
(cherry picked from commit 76d23f40314fc1dcd74a3d470b17782cc0ee5a3a)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-12 09:31:11 +02:00
Anton Khirnov
e0fcad7761 avconv: make -shortest work with streamcopy
CC: libav-stable@libav.org
(cherry picked from commit 48e50921337984ba4ec2c1cafe45d43787f84498)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-12 09:30:13 +02:00
Anton Khirnov
9455a023be matroskaenc: do not write negative timestamps
Bug-Id: 597, 341
2014-06-01 12:51:40 +02:00
Michael Niedermayer
03bda44689 Update for 1.1.11
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n1.1.11
2014-05-10 22:12:32 +02:00
Michael Niedermayer
8e8dc210cd sws: dont use the optimized 410->420 unscaled conversion when height%4
Fixes Ticket3594
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 421b21ca8a02a346ba03cea3bb2ecc33f791fc30)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 21:55:41 +02:00
Michael Niedermayer
3af977d4d6 avfilter/graphdump: Fix pointer to local outside scope
Fixes CID1194435
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 18af0ce62da322176f7bd283b85314d2f41bee2c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 21:55:41 +02:00
Michael Niedermayer
cb0d255e2f avcodec/mjpegdec: Fix undefined shift
Fixes CID1194388

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b4329605289e25bb071ec1c1182bf25fc83b09aa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 21:55:41 +02:00
Michael Niedermayer
d2ceca6e8b ffmpeg_filter: fix pointer to local outside scope
Fixes CID1206652
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 09b16619d33ddf93005060d0782f28a1c1cbb7f6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 21:55:41 +02:00
Michael Niedermayer
e8411c3b6d swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input
Fixes Ticket 3542

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 21:55:41 +02:00
Michael Niedermayer
3d5c38ca7d avformat/h263dec: Fix h263 probe
The code was missing 1 bit in the src format

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc145e576a443bfc89efdf35b91fd3c9ca0d8388)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 21:55:41 +02:00