Commit Graph

31893 Commits

Author SHA1 Message Date
Mans Rullgard
0054d70f23 mov: set AVCodecContext.width/height for h264
This is required for correct cropping of files from Canon
cameras.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 8aa93e9004)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 2fb4be9a99)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-06-10 11:23:47 +02:00
Mans Rullgard
b102d5d97d h264: allow cropping to AVCodecContext.width/height
Override the frame size from the SPS with AVCodecContext values
if the latter specify a size smaller by less than one macroblock.
This is required for correct cropping of MOV files from Canon cameras.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 30f515091c)

Conflicts:

	libavcodec/h264.c
(cherry picked from commit e1608014c5)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-06-10 09:54:22 +02:00
Michael Niedermayer
858c3158b5 Update for 0.8.12
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.8.12
2012-06-09 21:09:06 +02:00
Michael Niedermayer
5e87fa347c mpc8: fix channel checks
fix heap array overflow

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 44c10168cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:08:21 +02:00
Michael Niedermayer
6a441ee78e h263: disable loop filter with lowres
Fixes ticket1212

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc229d4e83)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:08:13 +02:00
Michael Niedermayer
316589e1db wmv1: check that the input buffer is large enough
Fixes null ptr deref
Fixes Ticket1367

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:53 +02:00
Michael Niedermayer
35bf5f7966 yopdec: check frame oddness to be within supported limits
Fixes Ticket1365

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:49 +02:00
Michael Niedermayer
89409be50c yopdec: check that palette fits in the packet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b6fdf8dea7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:43 +02:00
Michael Niedermayer
a4bf9033c3 8svx: fix crash
Fixes Ticket1377

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 03ce421c13)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:37 +02:00
Paul B Mahol
8502b4aef6 binkaudio: check number of channels
Fixes #1380.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 824a6975ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:22 +02:00
Michael Niedermayer
03e404740e indeo5: check quant_mat
prevents out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8aaa00c301)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:17 +02:00
Michael Niedermayer
688da036b1 truemotion1: Check index, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fd4c1c0b70)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:12 +02:00
Paul B Mahol
c761e144f6 iff: check if there is extradata
Fixes #1368.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 8f61526978)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:07:05 +02:00
Michael Niedermayer
b3e5c8de6a ape: Fix null ptr dereference with files missing a seekatable.
Such files are currently not supported as the table is used at several points

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e7cb161515)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:57 +02:00
Michael Niedermayer
ee6c1670df 4xm: fix division by zero caused by bps<8
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1b8741a684)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:52 +02:00
Michael Niedermayer
9e4a68a76c jvdec: check videosize
Fixes null ptr dereference
fixes Ticket1364

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:47 +02:00
Michael Niedermayer
25594f0018 motionpixels: check extradata size
Fixes null ptr derefernce
Fixes Ticket1363

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:41 +02:00
Michael Niedermayer
a85c3fff37 iff_ilbm: fix null ptr deref
Fixes Ticket1362

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:35 +02:00
Michael Niedermayer
0f5840b51a yop: check for missing extradata
Fixes null ptr deref
Fixes Ticket1361

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:29 +02:00
Michael Niedermayer
1285fe5530 xan: fix out of array read
Fixes ticket1360

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:22 +02:00
Michael Niedermayer
0aefcb6aa8 cdgraphics: Fix out of array write
Fixes Ticket1359

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1e5c7376c4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-09 21:06:12 +02:00
Michael Niedermayer
64bc5f3bf7 Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
* qatar/release/0.7:
  Update RELEASE file for 0.7.6
  Update changelog for 0.7.6 release
  ea: check chunk_size for validity.
  png: check bit depth for PAL8/Y400A pixel formats.
  x86: fix build with gcc 4.7
  qdm2: clip array indices returned by qdm2_get_vlc().
  kmvc: Check palsize.
  aacsbr: prevent out of bounds memcpy().
  rtpdec_asf: Fix integer underflow that could allow remote code execution
  dpcm: ignore extra unpaired bytes in stereo streams.
  tqi: Pass errors from the MB decoder
  h264: Add check for invalid chroma_format_idc
  adpcm: ADPCM Electronic Arts has always two channels
  h263dec: Disallow width/height changing with frame threads.
  vqavideo: return error if image size is not a multiple of block size
  celp filters: Do not read earlier than the start of the 'out' vector.
  motionpixels: Clip YUV values after applying a gradient.
  h263: more strictly forbid frame size changes with frame-mt.
  h264: additional protection against unsupported size/bitdepth changes.

Conflicts:
	Changelog
	RELEASE
	libavcodec/aacsbr.c
	libavcodec/h264_ps.c
	libavcodec/pngdec.c
	libavformat/rtpdec_asf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-04 13:05:25 +02:00
Reinhard Tartler
b61e311b0e Update RELEASE file for 0.7.6 2012-06-03 19:22:20 +02:00
Reinhard Tartler
ee66a7198e Update changelog for 0.7.6 release 2012-06-03 19:22:09 +02:00
Ronald S. Bultje
50336dc4f1 ea: check chunk_size for validity.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 273e6af47b)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 6a86b705e1d4b72f0dddfbe23ad3eed9947001d5)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-06-03 19:16:37 +02:00
Ronald S. Bultje
269dbc5359 png: check bit depth for PAL8/Y400A pixel formats.
Wrong bit depth can lead to invalid rowsize values, which crashes the
decoder further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit d2205d6543)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit b8d6ba9d50e80fdce2ed74cdaffd4960df8a21c5)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-06-03 19:16:37 +02:00
Mans Rullgard
850298ef25 x86: fix build with gcc 4.7
The upcoming gcc 4.7 has more advanced constant propagation
resulting some inline asm operands becoming constants and thus
emitted as literals, sometimes in contexts where this results
in invalid instructions.

This patch changes the constraints of the relevant operands
to "rm" thus forcing a valid type.  While obviously suboptimal,
this is what older gcc versions already did, and there is no
change to the code generated with these.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit da4c7cce21)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-06-02 19:22:50 -04:00
Ronald S. Bultje
628b82294a qdm2: clip array indices returned by qdm2_get_vlc().
Prevents subsequent overreads when these numbers are used as indices
in arrays.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 64953f67f9)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>

Conflicts:

	libavcodec/qdm2.c
2012-06-02 19:22:43 -04:00
Alex Converse
75d8cccf0e kmvc: Check palsize.
Fixes: CVE-2011-3952

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Based on fix by Michael Niedermayer
(cherry picked from commit 386741f887)
(cherry picked from commit 416849f2e0)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-29 15:40:57 +02:00
Alex Converse
d87997b56f aacsbr: prevent out of bounds memcpy().
Fixes Libav Bug 195.
Fixes CVE-2012-0850

This doesn't make the code handle sample rate or upsample/downsample
change properly but this is still a good sanity check.

Based on change by Michael Niedermayer.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit 17ce52912f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-28 20:55:34 +02:00
Michael Niedermayer
b15e85d820 rtpdec_asf: Fix integer underflow that could allow remote code execution
Fixes MSVR-11-0088
Fixes CVE-2011-4031
Credit:  Jeong Wook Oh of Microsoft and Microsoft Vulnerability Research (MSVR)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5ea091fb5a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-28 20:55:34 +02:00
Alex Converse
654b24f68a dpcm: ignore extra unpaired bytes in stereo streams.
Fixes: CVE-2011-3951

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit ce7aee9b73)
(cherry picked from commit eaeaeb265f)

Conflicts:

	libavcodec/dpcm.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-28 20:55:34 +02:00
Michael Niedermayer
2f2fd8c6d1 tqi: Pass errors from the MB decoder
This silences some valgrind warnings.
CC: libav-stable@libav.org

Fixes second half of http://ffmpeg.org/trac/ffmpeg/ticket/794
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit f85334f58e)
(cherry picked from commit 90290a5150)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 5872580e65)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-23 20:44:57 +02:00
Alexander Strange
c5f7c755cf h264: Add check for invalid chroma_format_idc
Fixes a crash when FF_DEBUG_PICT_INFO is used.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6ef4063957)

Fixes: CVE-2012-0851

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 4713234518)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-23 20:44:45 +02:00
Janne Grunau
b581580bd1 adpcm: ADPCM Electronic Arts has always two channels
Fixes half of http://ffmpeg.org/trac/ffmpeg/ticket/794
Adresses CVE-2012-0852

(cherry picked from commit bb5b3940b0)

Conflicts:

	libavcodec/adpcm.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-23 15:05:27 +02:00
Michael Niedermayer
3313f31f01 h263dec: Disallow width/height changing with frame threads.
Fixes CVE-2011-3937

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 71db86d53b)

Conflicts:

	libavcodec/h263dec.c

Signed-off-by: Alex Converse <alex.converse@gmail.com>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 4be63587e1)

Conflicts:

	libavcodec/h263dec.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-22 22:19:41 +02:00
Mans Rullgard
c71c77e56f vqavideo: return error if image size is not a multiple of block size
The decoder assumes in various places that the image size
is a multiple of the block size, and there is no obvious
way to support odd sizes.  Bailing out early if the header
specifies a bad size avoids various errors later on.

Fixes CVE-2012-0947.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 58b2e0f0f2)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit d5207e2af8)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-06 21:40:58 +02:00
Alex Converse
08c81f7365 celp filters: Do not read earlier than the start of the 'out' vector.
CC: libav-stable@libav.org
(cherry picked from commit 37ddd38332)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 9ea94c44b1)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-06 21:40:58 +02:00
Alex Converse
50073e2395 motionpixels: Clip YUV values after applying a gradient.
Prevents illegal reads on truncated and malformed input.

CC: libav-stable@libav.org
(cherry picked from commit b5da848fac)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit aaa6a66677)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-06 21:40:58 +02:00
Ronald S. Bultje
3fc967f6c7 h263: more strictly forbid frame size changes with frame-mt.
Prevents crashes because the old check was incomplete.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 2d22d4307d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 7fe4c8cb76)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-06 21:40:58 +02:00
Ronald S. Bultje
26ac878cc2 h264: additional protection against unsupported size/bitdepth changes.
Fixes crashes in codepaths not covered by original checks.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 732f9fcfe5)

Conflicts:

	libavcodec/h264.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 746f1594d7)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-05-06 21:40:58 +02:00
Michael Niedermayer
4169912f39 Update for 0.8.11
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.8.11
2012-04-09 18:50:08 +02:00
Michael Niedermayer
3b18d820cc Changelog, delete, its too inaccurate, git log is better.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 17:53:17 +02:00
Michael Niedermayer
c9d12a4692 pngenc: Fix incorrect mask used for interlaced mode.
Fixes Ticket1109

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 15:39:02 +02:00
Michael Niedermayer
7ca2ed716d dsp: fix diff_bytes_mmx() with small width
Fixes Ticket1068

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-09 15:37:55 +02:00
Michael Niedermayer
4f85e7b6ec Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
* qatar/release/0.7:
  Update changelog for 0.7.5 release

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-08 21:08:46 +02:00
ami_stuff
10848d0862 Replace SSE2 instruction in scalarproduct_float_sse() by SSE equivalent.
Fixes an AAC decoding issue with the sample from ticket #213 on machines
with SSE but without SSE2.
Based on 89411a by Reimar.

(cherry picked from commit f6b7863808)
2012-04-04 09:14:46 +02:00
Michael Niedermayer
b6cc1c77fd Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
* qatar/release/0.7: (84 commits)
  id3v2: fix skipping extended header in id3v2.4
  Update RELEASE file for 0.7.5
  lcl: use AVERROR_INVALIDDATA instead of AVERROR_UNKNOWN
  kgv1dec: Increase offsets array size so it is large enough.
  kgv1: use avctx->get/release_buffer().
  kvmc: fix invalid reads
  nsvdec: Propagate error values instead of returning 0 in nsv_read_header().
  mjpegbdec: Fix overflow in SOS.
  shorten: Use separate pointers for the allocated memory for decoded samples.
  shorten: check for realloc failure (cherry picked from commit 9e5e2c2d01)
  atrac3: Fix crash in tonal component decoding.
  ws_snd1: Fix wrong samples count and crash.
  ws_snd: add some checks to prevent buffer overread or overwrite. (cherry picked from commit 417364ce1f)
  ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.
  dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
  h264: stricter reference limit enforcement.
  jvdec: unbreak video decoding
  xxan: don't read before start of buffer in av_memcpy_backptr().
  dsicinvideo: validate buffer offset before copying pixels.
  huffyuv: add padding to classic (v1) huffman tables.
  ...

Conflicts:
	RELEASE
	libavcodec/atrac3.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/kgv1dec.c
	libavcodec/shorten.c
	libavcodec/svq3.c
	libavcodec/ws-snd1.c
	libavcodec/xxan.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-02 01:25:31 +02:00
Reinhard Tartler
808686375d Update changelog for 0.7.5 release 2012-04-01 22:47:53 +02:00
Anton Khirnov
bc5d86d23d id3v2: fix skipping extended header in id3v2.4
In v2.4, the length includes the length field itself.
(cherry picked from commit ddb4431208)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-04-01 19:20:50 +02:00