9595 Commits

Author SHA1 Message Date
Andreas Cadhalpun
6739df26a6 avformat/bit: check that pkt->size is 10 in write_packet
Ohter packet sizes are not supported by this muxer.

This avoids a null pointer dereference of pkt->data.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:50 +01:00
Andreas Cadhalpun
f92e8cccf5 avformat/adxdec: check avctx->channels for invalid values
This avoids a null pointer dereference of pkt->data.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:50 +01:00
Michael Niedermayer
3d023f4343 avformat/gxf: Use 64bit for res to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 12987f89007ee82b9d3a6090085dfaef8461ab8b)

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:50 +01:00
Michael Niedermayer
3b90117a1f avformat/thp: Check av_get_packet() for failure not only for partial output
Fixes null pointer dereference
Fixes: signal_sigsegv_db2c1f_3108_cov_163322880_pikmin2_opening1_partial.thp

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:50 +01:00
Michael Niedermayer
d0a925ba2e avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05e161952954acf247e0fd1fdef00559675c4d4d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
wm4
e83c03aaf1 avformat/mpc8: fix broken pointer math
This could overflow and crash at least on 32 bit systems.

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b737a2c52857b214be246ff615c6293730033cfa)

Conflicts:

	libavformat/mpc8.c
(cherry picked from commit 49dd89f9027f3def12e170bb7d986d37812eedba)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
wm4
376533e0cd avformat/mpc8: fix hang with fuzzed file
This can lead to an endless loop by seeking back a few bytes after each
attempted chunk read. Assuming negative sizes are always invalid, this
is easy to fix. Other code in this demuxer treats negative sizes as
invalid as well.

Fixes ticket #4262.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
Michael Niedermayer
1d73ad25dc avformat/smacker: Fix number suffix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 465f3705b1ef832fd6904750d018f81f9044f3ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
Michael Niedermayer
c00fd60ab3 avformat/utils: Fix number suffixes in tb_unreliable()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4b15bba2aec93776bfdc69a1bca42a4795a7d191)

Conflicts:

	libavformat/utils.c
(cherry picked from commit e651a2f88c219e74c9851563e74100f7652a6005)
2015-03-12 18:03:49 +01:00
Michael Niedermayer
766c1cbeb4 avformat/mov: fix integer overflow in mov_read_udta_string()
Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3859868c75313e318ebc5d0d33baada62d45dd75)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
Michael Niedermayer
adf2f2166e avformat/aviobuf: Check that avio_seek() target is non negative
Fixes out of array access

Suggested-by: Andrew Scherkus <scherkus@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ed86dbd05d61363dc1c0d33f3267e2177c985fdd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
wm4
39a6977354 avformat/matroskadec: fix handling of recursive SeekHead elements
When matroska_execute_seekhead() is called, it goes through the list of
seekhead entries and attempts to read elements not read yet. When doing
this, the parser can find further SeekHead elements, and will extend the
matroska->seekhead list. This can lead to a (practically) infinite loop
with certain broken files. (Maybe it can happen even with valid files.
The demuxer doesn't seem to check correctly whether an element has
already been read.)

Fix this by ignoring elements that were added to the seekhead field
during executing seekhead entries.

This does not fix the possible situation when multiple SeekHead elements
after the file header (i.e. occur after the "before_pos" file position)
point to the same elements. These elements will probably be parsed
multiple times, likely leading to bugs.

Fixes ticket #4162.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
Michael Niedermayer
a5c43d7c87 avformat/rmdec: Check codec_data_size
Fixes infinite loop
Fixes Ticket4154

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:49 +01:00
Michael Niedermayer
27d82d8374 avformat/mpegts: Check desc_len / get8() return code
Fixes out of array read
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:48 +01:00
Michael Niedermayer
ced4e9fdbb avformat/m4vdec: Check for non startcode 00 00 00 sequences in probe
Fixes miss detection of PCM as m4v
Fixes Ticket 3928

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 18:03:48 +01:00
Michael Niedermayer
817ed4fae9 Merge commit '82776caf7993221719eefbe576f851c7e52dfef9' into release/0.10
* commit '82776caf7993221719eefbe576f851c7e52dfef9':
  rmenc: limit packet size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 22:50:49 +01:00
Michael Niedermayer
3eaef560a7 Merge commit '51dd54c51aaca909893c9f90a4119e96ff71ffdf' into release/0.10
* commit '51dd54c51aaca909893c9f90a4119e96ff71ffdf':
  matroskadec: Fix read-after-free in matroska_read_seek()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 22:37:20 +01:00
Michael Niedermayer
522c7c37d2 Merge commit '0ceb2dffb6ba082a8abcc57c53a14b2512f0aa48' into release/0.10
* commit '0ceb2dffb6ba082a8abcc57c53a14b2512f0aa48':
  mov: avoid a memleak when multiple stss boxes are present

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 22:20:32 +01:00
Michael Niedermayer
c1f9be99d7 Merge commit 'b989bb7adee0f3286dcaa63c5cd0753eac45f6be' into release/0.10
* commit 'b989bb7adee0f3286dcaa63c5cd0753eac45f6be':
  apetag: Fix APE tag size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 22:05:04 +01:00
Michael Niedermayer
60190d8612 Merge commit '90a2359fef5325f90aec0eca51b145d90ca3df7d' into release/0.10
* commit '90a2359fef5325f90aec0eca51b145d90ca3df7d':
  nutdec: Remove unused and broken debug function stub

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 21:32:10 +01:00
Andreas Cadhalpun
82776caf79 rmenc: limit packet size
The chunk size is limited to UINT16_MAX (written by avio_wb16), so make
sure that the packet size is not too large.

Such large frames need to be split into slices smaller than 64 kB, but
that is currently supported neither by the rv10/rv20 encoders nor the rm
muxer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-08 20:37:26 +00:00
Xiaohan Wang
51dd54c51a matroskadec: Fix read-after-free in matroska_read_seek()
In matroska_read_seek(), |tracks| is assigned at the begining of the
function. However, functions like matroska_parse_cues() could reallocate
the tracks and invalidate |tracks|.

This assigns |tracks| only before using it, so that it will not get
invalidated elsewhere.

Bug-Id: chromium/427266
2015-01-27 14:36:34 +00:00
Anton Khirnov
0ceb2dffb6 mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 64f7575fbd64e5b65d5c644347408588c776f1fe)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 577f1feb3fd1e51fd14af7ce6d79d468faa3b929)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 931f5b235112f1c2a09dead36f0a228061d23942)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 93f919d0b4c4341ccee366c98ac9af813f8fe622)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:15:47 +01:00
Katerina Barone-Adesi
b989bb7ade apetag: Fix APE tag size check
The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

(cherry picked from commit 56ac2cbd0464e0146e62c91843e2b1f5e0908504)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavformat/apetag.c
2014-09-17 07:50:55 -07:00
Diego Biurrun
90a2359fef nutdec: Remove unused and broken debug function stub
(cherry picked from commit 83655442fa6dbf7578d108ce479f98a14ebb3e3c)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavformat/nutdec.c
2014-08-20 10:11:31 -07:00
Michael Niedermayer
437a0ae1a1 Merge commit 'ebe2292eafa7cac71dcdddb865e18c05635fe117' into release/0.10
* commit 'ebe2292eafa7cac71dcdddb865e18c05635fe117':
  mpegts: Do not try to write a PMT larger than SECTION_SIZE

Conflicts:
	libavformat/mpegtsenc.c

See: 68b14c044a4a00d69aeb620bdb57dce533c4190a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-12 19:09:33 +02:00
Michael Niedermayer
da19bfb287 Merge commit 'd86df7dd497ead1132bd95df7c4c18d91fbe3def' into release/0.10
* commit 'd86df7dd497ead1132bd95df7c4c18d91fbe3def':
  mpegts: Define the section length with a constant

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-12 19:01:28 +02:00
Luca Barbato
ebe2292eaf mpegts: Do not try to write a PMT larger than SECTION_SIZE
Prevent out of array write.

Similar to what Michael Niedermayer did to address the same issue.

Bug-Id: CVE-2014-2263
CC: libav-stable@libav.org
(cherry picked from commit addbaf134836aea4e14f73add8c6d753a1373257)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-08 14:27:47 +02:00
Luca Barbato
d86df7dd49 mpegts: Define the section length with a constant
The specification says the value is expressed in 10 bits including
the 4-byte CRC.

(cherry picked from commit 694b7cd873f8b06af109036eff1ccd741afdd28e)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Conflicts:
	libavformat/mpegtsenc.c
2014-08-08 14:27:27 +02:00
Michael Niedermayer
dd8464bc99 avformat/h263dec: Fix h263 probe
The code was missing 1 bit in the src format

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 01:50:05 +02:00
Michael Niedermayer
71a3ad42b8 avformat/mpegts: Remove redundant check
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ff6fa0b4b980fc5b9f7653d7b159ae02c3d95210)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 01:13:58 +02:00
Dale Curtis
2facb10f70 matroska: Fix use after free
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit ae3d41636942cbc0236bad21ad06c65f4eb0f096)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 01:13:58 +02:00
Michael Niedermayer
d499685d80 Merge commit '7fa72700298107fe756311ecb4dee5270ff12d35' into release/0.10
* commit '7fa72700298107fe756311ecb4dee5270ff12d35':
  swscale: Fix an undefined behaviour
  apedec: do not buffer decoded samples over AVPackets
  isom: lpcm in mov default to big endian

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 02:41:19 +02:00
Michael Niedermayer
0be41c6586 Merge commit '5463a2b0566b34b9e3847db9ceb1ef1d2a6004fc' into release/0.10
* commit '5463a2b0566b34b9e3847db9ceb1ef1d2a6004fc':
  movdec: handle 0x7fff langcode as macintosh per the specs
  avi: Improve non-interleaved detection

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 02:34:10 +02:00
Michael Niedermayer
b827189c6f Merge commit 'fa60904ebd58da33abf10b05e9933d24619cf096' into release/0.10
* commit 'fa60904ebd58da33abf10b05e9933d24619cf096':
  bytestream: add bytestream2_copy_buffer() functions
  bytestream: add functions for accessing size of buffer
  movenc: allow override of "writing application" tag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 02:23:03 +02:00
Michael Niedermayer
fe30351d52 Merge commit '330c18032464a4e1f3da907e54db2e69a6fbfcda' into release/0.10
* commit '330c18032464a4e1f3da907e54db2e69a6fbfcda':
  matroskaenc: allow override of "writing application" tag
  avfilter: Add missing emms_c when needed
  mpeg12: check scantable indices in all decode_block functions

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 02:18:16 +02:00
Mark Himsley
b7b798a1af isom: lpcm in mov default to big endian
It is my understanding that "Unless otherwise stated, all data in a
QuickTime movie is stored in big-endian byte ordering" [1] in MOV files.

I have a couple of thousand files, which technically are invalid because
their sound sample description element 4CC is 'lpcm' but its version is
0 - and "Version 0 supports only uncompressed audio in raw ('raw ') or
twos-complement ('twos') format" [2]

Because isom.c only contains a mapping for 4CC 'lpcm' to
AV_CODEC_ID_PCM_S16LE, these files have their audio decoded as LE when
it is actually BE.

This commit adds AV_CODEC_ID_PCM_S16BE as the first match for 4CC 'lpcm'.

[1]
https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
page 21
[2]
https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
page 178

Reviewed-by: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
2014-05-31 20:07:52 -04:00
Baptiste Coudurier
5463a2b056 movdec: handle 0x7fff langcode as macintosh per the specs
The correct point that seperates ISO and MAC language codes is 0x400
according to the current QT spec. Old QT specs did not list where this
seperation is but apparently only defined the meaning of the first 137.

(cherry picked from commit 9e71cc81f3655cacf0f91860fba3043f13b64059)
(cherry picked from commit 7940306a47df602be4f57a62175706265bbfd0aa)
2014-05-31 20:07:51 -04:00
Michael Niedermayer
42dcfe32a8 avi: Improve non-interleaved detection
Additional fixes by Nigel Touati-Evans <nigel.touatievans@gmail.com>.

Check the index for streams with a time drift of 2s or a buffer drift
of 64MB.

Bug-Id: 666
CC: libav-stable@libav.org
Sample-Id: yet-another-broken-interleaved-avi.avi

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-05-31 20:07:51 -04:00
John Stebbins
330c180324 matroskaenc: allow override of "writing application" tag
Signed-off-by: Tim Walker <tdskywalker@gmail.com>

CC: libav-stable@libav.org
(cherry picked from commit 0092c1dd8dac2d9e185b58503b447a0d3fb5230d)
2014-05-31 20:05:19 -04:00
John Stebbins
db52f056c3 movenc: allow override of "writing application" tag
Signed-off-by: Tim Walker <tdskywalker@gmail.com>

CC: libav-stable@libav.org
(cherry picked from commit 565e0c6d866ce08d4b06427456d3d1f4fd856e9c)
2014-05-31 20:05:19 -04:00
Michael Niedermayer
68b14c044a avformat/mpegtsenc: Check data array size in mpegts_write_pmt()
Prevents out of array writes

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

Conflicts:

	libavformat/mpegtsenc.c
(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-10 18:51:50 +01:00
Michael Niedermayer
15efd9a7c0 Merge commit '36017d49e2f797f7371dc24848a2285ca63e39ab' into release/0.10
* commit '36017d49e2f797f7371dc24848a2285ca63e39ab':
  Prepare for 0.8.11 Release
  lavf: make av_probe_input_buffer more robust
  Updated Changelog for 0.8.10
  oggparseogm: check timing variables
  mathematics: remove asserts from av_rescale_rnd()
  vc1: Always reset numref when parsing a new frame header.
  h264: reset num_reorder_frames if it is invalid

Conflicts:
	RELEASE
	libavcodec/vc1.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-10 18:31:07 +01:00
Michael Niedermayer
0d82c3a0ca Merge commit '979f77b0dc40571761999633a38d97be9a1670c8' into release/0.10
* commit '979f77b0dc40571761999633a38d97be9a1670c8':
  h264: check that an IDR NAL only contains I slices
  mov: Free an earlier allocated array if allocating a new one
  segafilm: fix leaks if reading the header fails
  h264_cavlc: check the size of the intra PCM data.
  cavs: Check for negative cbp
  avi: DV in AVI must be considered single stream
  avutil: use align == 0 for default alignment in audio sample buffer functions

Conflicts:
	libavcodec/cavsdec.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-10 18:14:20 +01:00
Michael Niedermayer
b7a750f67f Merge commit 'cb5d0ea0bec119ecbe327bd7d3834987ab42ec1a' into release/0.10
* commit 'cb5d0ea0bec119ecbe327bd7d3834987ab42ec1a':
  flashsv: Check diff_start diff_height values
  dsputil/pngdsp: fix signed/unsigned type in end comparison
  vqavideo: check chunk sizes before reading chunks
  avi: directly resync on DV in AVI read failure
  get_bits: change the failure condition in init_get_bits
  twinvq: Cope with gcc-4.8.2 miscompilation

Conflicts:
	libavcodec/dsputil.c
	libavcodec/flashsv.c
	libavcodec/get_bits.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-10 18:06:35 +01:00
Anton Khirnov
8cade1352b lavf: make av_probe_input_buffer more robust
Always use the actually read size as the offset instead of making
possibly invalid assumptions.

Addresses: CVE-2012-6618

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

Conflicts:
	libavformat/utils.c

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8575f5362f98c937758b20ff8512d6767a56208e)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-02-06 23:01:14 -05:00
Anton Khirnov
b0db7a523d oggparseogm: check timing variables
Fixes a potential divide by zero.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 75647dea6f7db79b409bad66a119f5c73da730f3)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit bf7c240a50f8ed99a42e08bb7a8a70262cce34ad)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-02-02 12:48:58 -05:00
Martin Storsjö
2f4e066d66 mov: Free an earlier allocated array if allocating a new one
It could probably also be considered an error if the pointer isn't
null at this point, but then we might risk rejecting some
slightly broken files that we might have handled so far.

Sample-Id: 00000496-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2620df13104ddaa136158eb6bb1195adbf9d7692)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit a1b4d42d31ba700c97d4388153a2a553d71ca0ba)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-02-02 12:45:09 -05:00
Anton Khirnov
6a56d16dc1 segafilm: fix leaks if reading the header fails
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 6892d145a0c80249bd61ee7dd31ec851c5076bcd)

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

Conflicts:
	libavformat/segafilm.c
2014-02-02 12:44:20 -05:00
Luca Barbato
2c0bfce4cb avi: DV in AVI must be considered single stream
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 3485a07977f17b8d4709fb327be4fc29031032b7)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-02-02 12:29:54 -05:00