67069 Commits

Author SHA1 Message Date
Ganesh Ajjanagadde
35ab85884b swresample/dither: check memory allocation
check memory allocation in swri_get_dither()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-08-20 14:29:11 +02:00
Michael Niedermayer
f141ac2d70 Merge commit 'c49b88b93bca53c04f18d78c27dbf1dc6daea909' into release/2.4
* commit 'c49b88b93bca53c04f18d78c27dbf1dc6daea909':
  opusdec: properly handle mismatching configurations in multichannel streams

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:20:26 +02:00
Michael Niedermayer
e0f859e8fe Merge commit '859ce02c9815b492da627d3098548b4f69bbc80e' into release/2.4
* commit '859ce02c9815b492da627d3098548b4f69bbc80e':
  h263: Always check both dimensions

Conflicts:
	libavcodec/ituh263dec.c

See: 62006b539ddda23594febf0fcb2f21c03de60457
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:14:53 +02:00
Michael Niedermayer
7da1e8a0d8 Merge commit 'aa3ec219e1a5cc0e96ddec6ea83312ec780448f5' into release/2.4
* commit 'aa3ec219e1a5cc0e96ddec6ea83312ec780448f5':
  imc: add required padding for GetBitContext buffer

Conflicts:
	libavcodec/imc.c

See: 7444cf9a9c0b8b2bba8198af2823521c654a48f4
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:11:30 +02:00
Michael Niedermayer
8b0a063ba9 Merge commit 'a9f108bd78e842a47ade2f7c8b22a1764d01d4e6' into release/2.4
* commit 'a9f108bd78e842a47ade2f7c8b22a1764d01d4e6':
  ac3_parser: add required padding for GetBitContext buffer

See: fccd85b9f30525f88692f53134eba41f1f2d90db
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:07:53 +02:00
Michael Niedermayer
80b1cc31b8 Merge commit '02477323b92aacdabe0a2d129eeb0c15fbd1ec9e' into release/2.4
* commit '02477323b92aacdabe0a2d129eeb0c15fbd1ec9e':
  aac_parser: add required padding for GetBitContext buffer

See: fccd85b9f30525f88692f53134eba41f1f2d90db
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-20 14:07:20 +02:00
Anton Khirnov
c49b88b93b opusdec: properly handle mismatching configurations in multichannel streams
The substreams can have different resampling delays, so an additional
level of buffering is needed to synchronize them.

Bug-Id: 876
2015-08-01 20:54:11 +02:00
Michael Niedermayer
dfc147d24f MAINTAINERS: Remove myself as leader
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2c58931e629343f7d68258cc2b2d62c5f501ba5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-31 18:35:31 +02:00
Luca Barbato
859ce02c98 h263: Always check both dimensions
CC: libav-stable@libav.org
Found-By: ago@gentoo.org
2015-07-22 13:05:35 +02:00
Janne Grunau
aa3ec219e1 imc: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
fate-imc.

CC: libav-stable@libav.org
2015-07-08 23:37:51 +02:00
Janne Grunau
a9f108bd78 ac3_parser: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
2015-07-08 23:37:51 +02:00
Janne Grunau
02477323b9 aac_parser: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
2015-07-08 23:37:51 +02:00
Michael Niedermayer
d9655621b3 avformat/swfdec: Do not error out on pixel format changes
Instead print an error and continue

Fixes Ticket4702

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a1204a1a46674084b1e6b92562f81aaab7aac69)
2015-07-08 12:46:58 +02:00
Paul B Mahol
1a4cb3b29c avcodec/exr: fix crash caused by merge
Various header informations need to be reset when decoding next frame.
Regression since: 95582b5c

Fixes ticket #4597.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a03b69478b7f1c0c31e53acb0cf392917c0f967a)
2015-06-19 11:25:52 +02:00
Michael Niedermayer
ff02eeafd8 avcodec/x86/h264_weight: handle weight1=128
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1009665759d4a3938dd2dd07b7e84d8bc9c5290)
2015-06-19 11:25:38 +02:00
Michael Niedermayer
bd28de1b4d avcodec/hevc_ps: Only discard overread VPS if a previous is available
Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57078e4d255a06246fef27846073f5ffb312b5dc)
2015-06-19 11:25:23 +02:00
Michael Niedermayer
57d094e3e3 avformat/mov: Mark avio context of decompressed atoms as seekable
Fixes Ticket4329

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ce564ea280b61d21eebf8a2fd741f792ce81638)
2015-06-19 11:25:06 +02:00
Michael Niedermayer
65d61a4bbb avfilter/x86/vf_hqdn3d: Fix register types
Fixes Ticket4301

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52fc3e372f8ed4de5735abed1f7f7569fe37b023)
2015-06-19 11:24:32 +02:00
Andreas Cadhalpun
1047c286fa libopenjpegenc: add NULL check for img before accessing it
If opj_image_create fails to allocate an image it returns NULL, which
causes a segmentation fault at 'img->x0 = 0'.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 1577526b47439f33a999339efdec5d624b70e1da)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.4.10
2015-06-03 03:22:17 +02:00
Michael Niedermayer
bf6ba4a032 swresample: Check the return value of resampler->init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 02915602d9313aa4b108342a3081244b9d2422bf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 01:31:20 +02:00
Michael Niedermayer
c6f343d7c4 Update for 2.4.10
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-02 01:12:40 +02:00
Andreas Cadhalpun
c646ee3da7 diracdec: check if reference could not be allocated
s->ref_pics[i] is later used as ref argument of interpolate_refplane,
where it is dereferenced.

If it is NULL, it causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d93181ef3eacdb862d93448f31c97765a523d1db)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Andreas Cadhalpun
68c11b6654 diracdec: avoid overflow of bytes*8 in decode_lowdelay
If bytes is large enough, bytes*8 can overflow and become negative.

In that case 'bufsize -= bytes*8' causes bufsize to increase instead of
decrease.

This leads to a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e66b39aa87eb653a6e5d15f70b792ccbf719de7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Andreas Cadhalpun
10429a5284 diracdec: prevent overflow in data_unit_size check
buf_idx + data_unit_size can overflow, causing the '> buf_size' check to
wrongly fail.

This causes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 984f50deb2d48f6844d65e10991b996a6d29e87c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Michael Niedermayer
f9f1c50b41 avformat/matroskadec: Use tracks[k]->stream instead of s->streams[k]
The later is not correct

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Andreas Cadhalpun
84cc40cbe1 matroskadec: check s->streams[k] before using it
This fixes a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e54540655f229d06667dc7fa7005f2a20e101e80)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:22 +02:00
Michael Niedermayer
43bfe0ada5 avcodec/ffv1dec: Check chroma shift parameters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d43cd6b08ed555c303478e3133717fbb2236be6e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
25b56dfa5c matroskadec: use uint64_t instead of int for index_scale
index_scale is set to matroska->time_scale of type uint64_t.

When index_scale is int, the assignment can overflow and e.g. result
in index_scale = 0. This causes a floating point exception due to the
division by index_scale.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit eb9fb508b0e09d85d234fe694333b2005e1d7a7e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
3126d6ee02 avcodec/wavpack: Check L/R values before use to avoid harmless integer overflow and undefined behavior in fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 042260cde4ecf716438c5fc92d15ad5f037ee2e1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
35a0d4801f nutdec: fix illegal count check in decode_main_header
The existing check has two problems:
 1) i + count can overflow, so that the check '< 256' returns true.
 2) In the (i == 'N') case occurs a j-- so that the loop runs once more.

This can trigger the assertion 'nut->header_len[0] == 0' or cause
segmentation faults or infinite hangs.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7c24ca1bda2d4df1dc9b2b982941be532d60da21)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
e0ef1b8c0b nutdec: check for negative frame rate in decode_info_header
A negative frame rate triggers an av_assert2 in av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6621105877ce0d65724a8ab60b3a50160adbe65d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
723d2b0c5b ffmpeg: remove incorrect network deinit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e2877bdf3862325c2982c3237d9bf28f1bbf793f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Maneesh Gupta
5260ba3e16 OpenCL: Avoid potential buffer overflow in cmdutils_opencl.c
The opt_opencl_bench function copied the device name using strcpy without checking if the source string was larger.
This patch fixes this by replacing the strcpy with av_strlcpy, with the string copy size capped to the destination buffer size.

Signed-off-by: Maneesh Gupta <maneesh.gupta@amd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cf234552b83a9503ff96572de2658b921b8842eb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Andreas Cadhalpun
427cf443ab apedec: set s->samples only when init_frame_decoder succeeded
Otherwise range_start_decoding is not necessarily run and thus
ctx->rc.range still 0 in range_dec_normalize leading to an infinite
loop.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 464c49155ce7ffc88ed39eb2511e7a75565c24be)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Dave Yeo
d818b8338c OS/2:Makedef.cmd cleanup
Remove PROTMODE as it doesn't make sense for DLLs. Also fixes a warning with the OpenWatcom linker
Export symbols as names rather then ordinals for better compatibility for minor releases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
666295ebab avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c720b9ce9850710e74a103d9626869e397a89faa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
9ce3e804ff avformat/mov: Fix parsing short loci
Fixes Ticket4557

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
f073ed6651 avformat/mov: Print reason of loci parsing failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e4f0cfc8ff4ab635ea12bdbd8d85d8bb1ba25f9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
b60895a13b avcodec/hevc: Fix typo in num_entry_point_offsets check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3051e7fa712dfe2136f19b7157211453895f2a3c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
eac07625f9 avcodec/libtheoraenc: Check for av_malloc failure
Fixes CID1257799

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
55ee305beb avcodec/dcadec: Check active_bands
Fixes CID1297594 part2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
0719b1849c avcodec/dcadec: Check scale table index
Fixes CID1297594 part 1

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

Conflicts:

	libavcodec/dcadec.c
2015-06-01 23:25:21 +02:00
Michael Niedermayer
a593e8190f avcodec/sonic: More completely check sample_rate_index and channels
Fixes CID1271783

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
41cb921512 avcodec/sonic: check memory allocations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c131a9fead5bf63215b6e1172b3c5c183cf90b85)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
7969c0c6f1 avcodec/smvjpegdec: check avcodec_decode_video2() return code
Fixes CID1271810

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
078ae8cbb7 avcodec/shorten: More complete pred_order check
Fixes CID1239055

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
49664f160e avcodec/shorten: Check skip_bytes()
Fixes CID1210526

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
deefa1580a avcodec/shorten: Fix code depending on signed overflow behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2d15588124ab1d4c0612cab66f02a716f1509211)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
b628942eef avcodec/proresdec2: Reset slice_count on deallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c4c6aea397f62421bf8ef0449b2b465a53e4ab4d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00
Michael Niedermayer
91767369a7 ffmpeg_opt: Fix -timestamp parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 107e4da47644fe615ea821d6a19682d73789aca7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 23:25:21 +02:00