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
a3d331f2d8
Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
...
* qatar/release/0.7: (96 commits)
intfloat_readwrite: fix signed addition overflows
smacker: validate channels and sample format.
smacker: check buffer size before reading output size
smacker: validate number of channels
sipr: fix get_bits(0) calls
motion_est: make MotionExtContext.map_generation unsigned
4xm: prevent NULL dereference with invalid huffman table
4xmdemux: prevent use of uninitialized memory
4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffers
ptx: check for out of bound reads
tiffdec: fix out of bound reads/writes
eacmv: check for out of bound reads
eacmv: fix potential pointer arithmetic overflows
adpcm: fix out of bound reads due to integer overflow
anm: prevent infinite loop
avsdemux: check for out of bound writes
avs: check for out of bound reads
avsdemux: check for corrupted data
mxfdec: Fix some buffer overreads caused by the misuse of AVPacket related functions.
vaapi: Fix VC-1 decoding (reconstruct bitstream TTFRM correctly).
...
Conflicts:
libavcodec/adpcm.c
libavcodec/bink.c
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/motion_est_template.c
libavcodec/mpegvideo.c
libavcodec/nellymoserdec.c
libavcodec/ptx.c
libavcodec/svq3.c
libavcodec/vaapi_vc1.c
libavcodec/xan.c
libavfilter/vf_scale.c
libavformat/4xm.c
libavformat/flvdec.c
libavformat/mpeg.c
tests/ref/fate/motionpixels
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2012-03-19 05:14:44 +01:00
Laurent Aimar
be2404b06d
xan: Prevent NULL dereference with missing palette
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
(cherry picked from commit 7d17a794f0 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2012-03-18 17:50:31 +01:00
Laurent Aimar
49007b494e
xan: Check for out of bound reads in xan_huffman_decode()
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
(cherry picked from commit 3db3fdf4c6 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2012-03-18 17:50:31 +01:00
Laurent Aimar
0277c82de2
xan: Fixed out of bound accesses in xan_unpack()
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
(cherry picked from commit 3e0757c2a8 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2012-03-18 17:50:31 +01:00
Laurent Aimar
fb20141563
xan: Prevent NULL dereferences with missing reference frame
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
(cherry picked from commit 06be075cda )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2012-03-18 17:50:31 +01:00
Laurent Aimar
8751941030
xan: Prevent out of bound accesses
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
(cherry picked from commit 124a16f678 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2012-03-18 17:50:30 +01:00
Laurent Aimar
f9efe1d76e
Check for out of bound reads in xan_huffman_decode() of the xan decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit c8b835954a )
2011-10-01 20:53:44 +02:00
Laurent Aimar
14617fa7b8
Prevent NULL dereference when the palette is missing in the xan decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 56ee5a9ad1 )
2011-10-01 20:51:12 +02:00
Laurent Aimar
485b4317bb
Fixed out of bound accesses in xan_unpack() of the xan decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 5279141c1d )
2011-10-01 20:51:08 +02:00
Laurent Aimar
03a4b489f1
Prevent out of bound accesses in the xan decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit feca3ba053 )
2011-10-01 20:44:51 +02:00
Laurent Aimar
6b0565e5b8
Prevent NULL dereferences when missing the reference frame in the xan decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
(cherry picked from commit 19e95b8845 )
2011-10-01 20:44:40 +02:00
Alex Converse
61ddc8271d
xan: Add some buffer checks
...
(cherry picked from commit 0872bb23b4 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-09-26 19:26:32 +02:00
Laurent Aimar
e6694dce1c
Fixed size given to init_get_bits() in xan decoder.
...
(cherry picked from commit 393d5031c6 )
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-09-26 19:26:32 +02:00
Alex Converse
b7000d0517
xan: Add some buffer checks
...
(cherry picked from commit 0872bb23b4 )
2011-09-21 19:47:12 +02:00
Alex Converse
169e634457
xan: Remove extra trailing newline
...
(cherry picked from commit 350f57bd7b )
2011-09-21 19:47:06 +02:00
Laurent Aimar
053bc4ce8b
Fixed size given to init_get_bits() in xan decoder.
...
(cherry picked from commit 393d5031c6 )
2011-09-21 19:47:00 +02:00
Stefano Sabatini
01042d4123
lavc: set defaults in internal codec frames
...
This is required specifically for setting frame->format to -1,
otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading
the format from the output decoded frame will get misled.
In particular fix regressions occurring with the pending vsrc_buffer
patch.
2011-05-07 12:03:59 +02:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-03-19 13:33:20 +00:00
Kostya
fff6c21295
Remove Xan WC4 cruft from xan.c
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
(cherry picked from commit 90e8a9c34f )
2011-02-09 03:31:18 +01:00
Kostya
90e8a9c34f
Remove Xan WC4 cruft from xan.c
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-02-07 08:06:16 -05:00
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com >
(cherry picked from commit d36beb3f69 )
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-01-26 16:08:45 +00:00
Reimar Döffinger
782f69e8a5
Fix memleak: free palette data on close.
...
Originally committed as revision 25816 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 20:42:03 +00:00
Reimar Döffinger
18d761a1b1
Fix indentation.
...
Originally committed as revision 25780 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:38:08 +00:00
Reimar Döffinger
3354b05187
Add explanation and alternative implementation for strange xan
...
gamma correction.
Originally committed as revision 25779 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:37:26 +00:00
Reimar Döffinger
24ae353dfb
WC3/xan: move palette handling to decoder, avoiding need for
...
PaletteControl.
This also fixes playback of some files with ffplay (images were
corrupted for a short time after a palette change).
Originally committed as revision 25778 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:32:23 +00:00
Stefano Sabatini
f2f8fb1035
Remove redundant text in the log.
...
Originally committed as revision 25517 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:19:59 +00:00
Stefano Sabatini
082a857522
Make XAN decoder return meaningful error codes.
...
Originally committed as revision 25516 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:19:53 +00:00
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Diego Biurrun
cb39768960
Add long_name for Xxan codec.
...
Originally committed as revision 20900 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-19 18:41:03 +00:00
Kostya Shishkov
0080402d36
Improve handling allocated buffers in Xan decoder
...
Originally committed as revision 20899 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-19 17:04:30 +00:00
Kostya Shishkov
2628f515fe
cosmetics: reindent a bit
...
Originally committed as revision 20898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-19 16:39:21 +00:00
Reimar Döffinger
4a49ab77c6
Remove unnecessary calls to avcodec_check_dimensions, the check is already
...
done at a higher level.
Originally committed as revision 20229 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-13 20:13:28 +00:00
Reimar Döffinger
5333450ce6
Use memcpy to copy till end of line in one go instead of copying pixel by pixel
...
in xan_wc3_output_pixel_run and xan_wc3_copy_pixel_run
Originally committed as revision 19774 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-05 19:35:59 +00:00
Reimar Döffinger
64b8e620cb
Slightly simplify detection of end of compressed data in xan_unpack
...
Originally committed as revision 19772 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-05 19:14:44 +00:00
Måns Rullgård
3aab27b459
Remove useless #include <unistd.h> from many files
...
Originally committed as revision 19499 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-22 23:37:53 +00:00
Reimar Döffinger
f63f689e10
Avoid code duplication in xan_unpack for the final memcpy.
...
Originally committed as revision 18608 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-18 17:26:00 +00:00
Reimar Döffinger
d7670f2827
Use sign_extend function instead of reimplementing it.
...
Originally committed as revision 18599 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 20:05:27 +00:00
Reimar Döffinger
e62f622193
Remove a useless "& 0xF"
...
Originally committed as revision 18598 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 20:01:45 +00:00
Reimar Döffinger
977d813447
Use / and % operators instead of reimplementing them with a loop.
...
Originally committed as revision 18597 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 19:56:50 +00:00
Reimar Döffinger
b1e309865f
Change buffer check to avoid an unlikely pointer arithmetic overflow.
...
Originally committed as revision 18596 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 19:49:55 +00:00
Reimar Döffinger
be50938073
Simplify xan_huffman_decode by using get_bits
...
Originally committed as revision 18595 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 19:48:54 +00:00
Reimar Döffinger
e5986d0427
Cosmetics to improve xan_unpack readability
...
Originally committed as revision 18590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 19:14:11 +00:00
Reimar Döffinger
16cc5a738c
Fix buffer size check for xan_unpack which was broken by r18586
...
Originally committed as revision 18589 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 19:07:16 +00:00
Reimar Döffinger
c644665f42
Some more simplifications of xan_unpack
...
Originally committed as revision 18588 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 19:03:43 +00:00
Reimar Döffinger
455fdd2f8c
Reindent xan_unpack code
...
Originally committed as revision 18587 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 18:56:47 +00:00
Reimar Döffinger
948f60fa24
Avoid some code duplication in xan_unpack
...
Originally committed as revision 18586 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 18:54:17 +00:00
Reimar Döffinger
59bd7f23e8
Increase buffer padding to avoid most space checks in xan_unpack
...
Originally committed as revision 18584 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-17 18:26:24 +00:00