Commit Graph

21433 Commits

Author SHA1 Message Date
Michael Niedermayer 62006b539d ituh263dec: more complete w/h check.
Fixes a division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 02:44:03 +01:00
Michael Niedermayer caa2fa2c69 rv10: always check image size not just in some cases.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 02:17:26 +01:00
Michael Niedermayer 12eb2fd539 dxa: dont try to use the previous frame if there is none.
Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 00:43:30 +01:00
Michael Niedermayer e70144cba1 bink: check quant_index, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 23:54:00 +01:00
Michael Niedermayer 612ecfbbbb gifdec: check ff_lzw_decode_init() return value, fix out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 23:00:11 +01:00
Michael Niedermayer 50f0a6b4e6 wmaprodec: check num_sfb for validity. Fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 21:15:08 +01:00
Michael Niedermayer 30bce34b67 vpriv_adx_decode_header: avoid underreading the array.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 19:16:08 +01:00
Michael Niedermayer ab8517b891 vc1dec: require a minimum of 2x2 for the edge pos. Avoid assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 19:16:08 +01:00
Michael Niedermayer ccce723c6d vc1dec: check first field slices, fix out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 17:35:01 +01:00
Michael Niedermayer a1b5c9634e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: mmx2 ---> mmxext in asm constructs

Conflicts:
	libavcodec/x86/h264_chromamc_10bit.asm
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264dsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 12:34:30 +01:00
Michael Niedermayer d4e74d5d6d Remove deprecation of avcodec_get_chroma_sub_sample.
Add explanations what the difference between the 2 functions are and
when either should be used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 12:04:39 +01:00
Michael Niedermayer e13d5e9a4b Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2'
* commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2':
  x86: h264_weight_10bit: port to cpuflags
  libtheoraenc: add missing pixdesc.h header
  avcodec: remove ff_is_hwaccel_pix_fmt
  pixdesc: add av_pix_fmt_get_chroma_sub_sample
  hlsenc: stand alone hls segmenter

Conflicts:
	doc/muxers.texi
	libavcodec/ffv1enc.c
	libavcodec/imgconvert.c
	libavcodec/mpegvideo_enc.c
	libavcodec/tiffenc.c
	libavformat/Makefile
	libavformat/allformats.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 11:59:20 +01:00
Michael Niedermayer 66ff90f4a3 8bps: check index against buffer size before reading line length pointer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 03:34:01 +01:00
Michael Niedermayer 7acee6654c mpeg12data: increase size of ff_mpeg1_default_intra_matrix to prevent harmless overreads from crashing
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 03:17:52 +01:00
Michael Niedermayer e1631f8ebe aasc: check before reading the first 4 byte, fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 03:03:35 +01:00
Michael Niedermayer 39c5cd601e vmnc: check input size before reading chunk header, fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 02:51:38 +01:00
Diego Biurrun 26301caaa1 x86: mmx2 ---> mmxext in asm constructs 2012-11-14 00:58:51 +01:00
Diego Biurrun da39cac8de Drop broken and unused CABAC test program. 2012-11-14 00:36:17 +01:00
Michael Niedermayer 2f74f8d7dc imc: sanity check scalefactors.
This fixes undefined behavior

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 00:03:42 +01:00
Michael Niedermayer 001af703c6 alac: check channel count more completely, fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 22:08:09 +01:00
Michael Niedermayer b119133136 avrndec: calculate true_height only when used.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 22:03:21 +01:00
Michael Niedermayer 7373b3ad04 pcmdec: consistently use codec_id, fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 21:45:53 +01:00
Michael Niedermayer 7c76eaeca2 mpeg4video_parser: init static tables before use, fix nulll ptr deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 19:21:59 +01:00
Michael Niedermayer 1bd024ec77 mpeg4videodec: split static decoder table init out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 19:20:59 +01:00
Diego Biurrun 5e9c6ef8f3 x86: h264_weight_10bit: port to cpuflags 2012-11-13 19:07:09 +01:00
Michael Niedermayer c74cd99986 rv10: consider B frames in low delay streams invalid.
Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 18:00:00 +01:00
Luca Barbato 83f9ed42ec libtheoraenc: add missing pixdesc.h header
Was left out from c1a02e884a.
2012-11-13 17:42:13 +01:00
Michael Niedermayer a0212ecf84 dcadec: check layout & channel count for consistency.
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 17:33:38 +01:00
Luca Barbato cc085993f4 avcodec: remove ff_is_hwaccel_pix_fmt
It is used only in one place and is unlikely it would be needed
elsewhere.
2012-11-13 16:21:47 +01:00
Luca Barbato c1a02e884a pixdesc: add av_pix_fmt_get_chroma_sub_sample
Deprecate avcodec_get_chroma_sub_sample.
2012-11-13 16:14:55 +01:00
Paul B Mahol 1acd2f6ba7 Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
Also remove it in once case when it is not needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-13 13:21:21 +00:00
Michael Niedermayer e97a24109c avcodec.h: update audioconvert.h header after rename
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 13:30:52 +01:00
Stefano Sabatini 8cb76ef275 lavc/libtheoraenc: return proper error codes 2012-11-13 11:37:48 +01:00
Michael Niedermayer 7eb40d85f2 Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b'
* commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b': (21 commits)
  jvdec: set channel layout
  iss: set channel layout
  ipmovie: set channel layout
  iff: set channel layout
  idroqdec: set channel layout
  gxfdec: set channel layout when applicable
  gsmdec: set channel layout
  flvdec: set channel layout
  dv: set channel layout
  dsicin: set channel layout
  daud: set channel layout
  cdxl: set channel layout
  bmv: set channel layout
  bink: set channel layout
  bfi: set channel layout
  bethsoftvid: set channel layout
  apc: set channel layout
  amr: set channel_layout
  ppc: replace pointer casting with AV_COPY32
  ppc: fix some unused variable warnings
  ...

Conflicts:
	libavformat/amr.c
	libavformat/iff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 10:55:07 +01:00
Michael Niedermayer d8a1eb11b7 wavpack: check the blocks sample count, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 01:13:07 +01:00
Michael Niedermayer 580021cfc4 wavpack: check ch_offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 01:11:59 +01:00
Michael Niedermayer e9cb533fbb flashv: check if keyframe is available, fix null deref.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 00:22:24 +01:00
Michael Niedermayer 4b2f696d6e flashv: use avcodec_set_dimensions()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 00:21:45 +01:00
Michael Niedermayer 0a373c31cb svq1dec: dont export the qscale table.
SVQ1 has no qscales so the table is of no use, and it triggers a bug as
SVQ1 does not maintain the size of the table properly causing a crash.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 23:01:42 +01:00
Michael Niedermayer 7ab690bf5f indeo4: more complete check for the scan vs block sizes.
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 23:01:42 +01:00
Clément Bœsch 7581ad24a9 lavc/aac: fix shared build failures with MSVC.
This is a workaround until a better solution is found.
2012-11-12 22:28:57 +01:00
Michael Niedermayer 0e239b22db xan: check size_segment before reading, fixes out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 20:50:13 +01:00
Michael Niedermayer a9456c7c5c mjpegdec: tighten unescaped_buf_size size check, prevent null ptr deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 20:27:57 +01:00
Michael Niedermayer d1493d2ce5 theora: check that pix fmt is valid, fix null ptr deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 18:12:17 +01:00
Michael Niedermayer 9eef41b848 lagarith: always allocate for 4 planes. Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 18:05:08 +01:00
Michael Niedermayer c433823750 4xmdec: test version for cfrms, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 14:56:33 +01:00
Michael Niedermayer be818df547 wavpack: fix out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 14:43:05 +01:00
Paul B Mahol 0cbb31a264 adpcm: reindent after previous commit
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-12 11:46:22 +00:00
Paul B Mahol e8a9b1a1a0 adpcm: ADPCM IMA SMJPEG stereo decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-12 11:46:22 +00:00
Paul B Mahol 0baec57d09 anm: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-12 11:46:12 +00:00