Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-01-15avformat/hls: Even stricter URL checksMichael Niedermayer
This fixes a null pointer dereference at least Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15avformat/hls: More strict url checksMichael Niedermayer
No case is known where these are needed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15avcodec/rmdec: add missing av_log argumentJames Almer
Also change the format specifier to expect an unsigned int Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-15lavf/mov: Confine 0x00000000 to raw/twos fourcc mapping to version 0 sample ↵Mats Peterson
descriptions Confine the 0x00000000 to 'raw '/'twos' fourcc mapping to old version 0 sound sample descriptions, since they are the only valid sample descriptions for this type of mapping. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15asfdec_o: check for too small size in asf_read_unknownAndreas Cadhalpun
This fixes infinite loops due to seeking back. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15asfdec_o: break if EOF is reached after asf_read_packet_headerAndreas Cadhalpun
asf_read_payload can unset eof_reached, so check it also before calling that function. This fixes infinite loops. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15asfdec_o: make sure packet_size is non-zero before seekingAndreas Cadhalpun
This fixes infinite loops due to seeking back. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15asfdec_o: prevent overflow causing seekbackAndreas Cadhalpun
This fixes infinite loops. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15asfdec_o: check avio_skip in asf_read_simple_indexAndreas Cadhalpun
The loop can be very long, even though the file is very short. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15asfdec_o: reject size > INT64_MAX in asf_read_unknownAndreas Cadhalpun
Both avio_skip and detect_unknown_subobject use int64_t for the size parameter. This fixes a segmentation fault due to infinite recursion. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15asfdec_o: only set asf_pkt->data_size after sanity checksAndreas Cadhalpun
Otherwise invalid values are used unchecked in the next run. This can cause NULL pointer dereferencing. Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15avformat/rmdec: Fix Packet memleak at close()Michael Niedermayer
Fixes: asan_heap-oob_445b39_1741_d00eb645ab48eb2203b4a04a5b997103.ivr Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15avformat/rmdec: Check size in ivr_read_packet() before useMichael Niedermayer
Fixes out of array access Fixes: asan_heap-oob_445b39_1741_d00eb645ab48eb2203b4a04a5b997103.ivr Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-14avformat/hls: forbid all protocols except http(s) & fileMaxim Andreev
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-13avformat/aviobuf: Fix end check in put_str16()Michael Niedermayer
Fixes out of array read Fixes: 03c406ec9530e594a074ce2979f8a1f0/asan_heap-oob_7dec26_4664_37c52495b2870a2eaac65f53958e76c1.flac Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12lavf/mpjpegdec: Do not call av_log() while probing.Carl Eugen Hoyos
2016-01-12avformat/asfenc: Check ptsMichael Niedermayer
Fixes integer overflow Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12avformat/asfenc: Flush packet before duration becomes unrepresentableMichael Niedermayer
Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12lavf/matroskadec: Use av_realloc() in get_qt_codec()Mats Peterson
Use av_realloc() rather than av_malloc() when normalizing noncompliant private data in get_qt_codec(). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12rtmpdh: Initialize gcrypt before using itRicardo Constantino
Either disabling or init'ing secure memory is required after the use of gcry_check_version. From a look at the functions rtmpdh uses, I noticed none require the use of secure memory, so we disable it [1][2]. This resolves some errors returned by rtmpdh code with uninitialized gcrypt, especifically: Fatal: failed to create the RNG lock: Invalid argument FATAL: failed to acquire the FSM lock in libgrypt: Invalid argument Version "1.5.4" was arbitrarily chosen. An older version probably works as well, but I couldn't compile older versions to test on my machine. [1] https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html [2] https://www.gnupg.org/documentation/manuals/gcrypt/Controlling-the-library.html Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12ffmdec: change type of len to ptrdiff_tAndreas Cadhalpun
It is used to store the difference between pointers, so ptrdiff_t is the correct type. This prevents potential overflows. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-12qtpalette: make the color_* variables unsigned againAndreas Cadhalpun
This fixes segmentation faults due to out of bounds writes, when color_start is interpreted as negative number. This regression was introduced in commit 57631f. Reviewed-by: Mats Peterson <matsp888@yahoo.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-11avformat/dfa: Fix packet leak on errorMichael Niedermayer
Fixes: 07fa81f300736485e585b63e7b1cd155/signal_sigabrt_7ffff6ae7cb7_16_94ee815791a1357826524072db5bc2dc.dfa Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-11lavf/matroskadec: Normalize noncompliant A_QUICKTIME/V_QUICKTIME private dataMats Peterson
This patch adds a new static function get_qt_codec() that takes care of the initial retrieval of the fourcc and codec ID for A_QUICKTIME and V_QUICKTIME. It also normalizes noncompliant private data found in some older files that incorrectly starts with the fourcc by expanding/shifting the data by 4 bytes, and storing the data size at the start. This is necessary in order for the rest of the code in the A_QUICKTIME and V_QUICKTIME blocks (and most likely other code as well) to correctly parse the private data. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-10lavf/concatdec: do not access packet if av_read_frame returned errorMarton Balint
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
2016-01-09avformat: Add integer fps from 31 to 60 to get_std_framerate()Michael Niedermayer
Fixes Ticket 5106 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-09avformat/movenc: Check that pkt duration is within 32bit rangeMichael Niedermayer
Durations outside are not supported Fixes Ticket5114 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-09avformat/ivfenc: fix division by zeroMichael Niedermayer
Fixes Ticket 5115 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-08avformat/mov: Simplify format checking codeMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-08lavf/matroskadec: A_QUICKTIME and fourcc 0x00000000Mats Peterson
In many older QuickTime files, the audio format, or "fourcc", is 0x00000000. The QuickTime File Format Specification states the following regarding this situation: "This format descriptor should not be used, but may be found in some files. Samples are assumed to be stored in either 'raw ' or 'twos' format, depending on the sample size field in the sound description." MPlayer handles this logic by itself, but FFmpeg/FFplay currently does not. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-08lavf/mov: Audio and fourcc 0x00000000Mats Peterson
In many older QuickTime files, the audio format, or "fourcc", is 0x00000000. The QuickTime File Format Specification states the following regarding this situation: "This format descriptor should not be used, but may be found in some files. Samples are assumed to be stored in either 'raw ' or 'twos' format, depending on the sample size field in the sound description." MPlayer handles this logic by itself, but FFmpeg/FFplay currently does not. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-08lavf/uncodedframecrcenc: use FF_CEIL_RSHIFT()Clément Bœsch
2016-01-06lavf/matroskadec: correct codec_tag for "SMI" SVQ3 filesMats Peterson
This corrects the codec_tag for some SVQ3 files Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05lavf/matroskaenc: Assume 48kHz sample rate for Opus initial padding.Carl Eugen Hoyos
Analyzed by Timothy B. Terriberry in Mozilla bug 1227153. Fixes ticket #5121.
2016-01-04brstm: fix missing closing braceAndreas Cadhalpun
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-04brstm: also allocate b->table in read_packetAndreas Cadhalpun
This fixes NULL pointer dereferencing if the codec is forced to adpcm_thp even though a different one was detected. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-04brstm: make sure an ADPC chunk was read for adpcm_thpAndreas Cadhalpun
This fixes NULL pointer dereferencing. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-04lavf/qtpalette: Ignore greyscale bit in certain casesMats Peterson
The QuickTime File Format Specification states the following: "Depth: A 16-bit integer that indicates the pixel depth of the compressed image. Values of 1, 2, 4, 8 ,16, 24, and 32 indicate the depth of color images. The value 32 should be used only if the image contains an alpha channel. Values of 34, 36, and 40 indicate 2-, 4-, and 8-bit grayscale, respectively, for grayscale images." There is no mention of value 33, i.e. 1-bit video (0x01) with the greyscale bit (0x20) set. I therefore suggest that we ignore the greyscale bit when processing 1-bit video. Another reason to do this is that the first 1-bit sample file below will be displayed properly with blue colors in QuickTime in Windows or Mac *in spite of* the greyscale bit being set. Also, QuickTime in Windows or Mac ignores the greyscale bit if the video sample description contains a palette, regardless of bit depth. This is undocumented behaviour, but I think we should do the same, and it seems pretty logical after all, since one wouldn't really bother putting a customized palette into a grayscale file anyway. See the second 8-bit sample file below, which has the greyscale bit set, and which contains a palette in the video sample description. In Windows or Mac, it will be displayed with the palette in the sample description, in spite of the greyscale bit being set. Sample file 1 (1-bit QuickTime Animation): https://drive.google.com/open?id=0B3_pEBoLs0faTThSek1EeXQ0ZHM Earth Spin 1-bit qtrle orig.mov Sample file 2 (8-bit QuickTime Animation): https://drive.google.com/open?id=0B3_pEBoLs0fad2s0V1YzUWo5aDA quiz-palette+gs.mov Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-03ffmdec: reset packet_end in case of failureAndreas Cadhalpun
This fixes segmentation faults caused by passing a packet_ptr of NULL to memcpy. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-03avformat/ffmdec: Add {} to nested if/elseMichael Niedermayer
This preempts potential bugs if this is changed and the indention ends up different from C interpretation Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-02ffmdec: change type of state and id to unsignedAndreas Cadhalpun
This fixes ubsan runtime error: left shift by 8 places cannot be represented in type 'int' Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-02Merge commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1'Hendrik Leppkes
* commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1': Remove stray line breaks from avpriv_{report_missing_feature|request_samples} Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02Merge commit '5049f6b772891cdf4030a9d572362efc8f7ae97f'Hendrik Leppkes
* commit '5049f6b772891cdf4030a9d572362efc8f7ae97f': rtpdec_jpeg: Coalesce redundant error checks Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02oggparsedaala: reject too large gpshiftAndreas Cadhalpun
Also use a unsigned constant for the shift calculation, as 1 << 31 is undefined for int32_t. This is also fixed oggparsetheora. This fixes ubsan runtime error: shift exponent is too large for 32-bit type 'int' Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-02avcodec/utils: fix AVPacket lifetime in seek_frame_genericHendrik Leppkes
Fixes ticket #5117
2016-01-01avformat/mp3dec: Remove unused variableMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-01lavf/srtdec: rewrite parsing logicClément Bœsch
Fixes Ticket #5032 The samples in Ticket #5032 is using \r\r\n as line breaks. Since we already are handling \r, or \n, or \r\n as line breaks, \r\n\n will be considered as a double line breaks. This is an issue because ff_subtitles_read_text_chunk() will as a result stop extracting a chunk after just one line. So instead of parsing the SRT by "chunks" (which means splitting every double LB), this new parser is detecting timing lines, and split the events on this basis. While this sounds safe and simple, it needs to take into account the event number preceding the timing line while handling situations such as: - event number starting at 0 or actually any number instead of 1 - event numbers not being ordered at all - event number being followed by text garbage (this really happened, see Ticket #4898) - event payload containing one or multiple number (a protagonist saying a count-down, a date or whatever) which could be confused with a chapter number - event number being empty (see Ticket #2167) - all kind of weird line breaks can appear randomly like wild pokémons - untrustable line breaks (Ticket #5032) The sample madness.srt tries to sum up most of this into one sample, ticket5032-rrn.srt is the file containing \r\r\n line breaks. and empty-events-2167.srt contains empty events.
2016-01-01Merge commit '64f8c439fd663fec4d57ac21af572d498fe21f7a'Hendrik Leppkes
* commit '64f8c439fd663fec4d57ac21af572d498fe21f7a': rtmpproto: Include the full path as app when "slist=" is found Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01Merge commit '2d0432d918a71468419b7ac1e543ab3b399d3d37'Hendrik Leppkes
* commit '2d0432d918a71468419b7ac1e543ab3b399d3d37': vocdec: put the code not shared with other demuxers under appropriate ifdef Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01Revert "Merge commit '9f1eccb97bf8894cb18b14f642500686505ef186'"Michael Niedermayer
This unbreaks muxing-encoding Example: ffmpeg -i matrixbench_mpeg2.mpg new.avi -rw-r----- 1 michael michael 226035354 Jan 1 16:27 new.avi -rw-r----- 1 michael michael 10016802 Jan 1 16:28 ref.avi Also av_get_audio_frame_duration() itself uses frame_size This reverts commit 29e6606e9b42aa811be995e2fcdea4806911bc9f, reversing changes made to 53448461a7720afab0d1f1234af79573fd2e020d.