1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

49162 Commits

Author SHA1 Message Date
Xi Wang
4e692374f7 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:29:59 +01:00
Xi Wang
902cfe2f74 rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:28:38 +01:00
Xi Wang
2f014567cf rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:28:01 +01:00
Michael Niedermayer
713dea584b truemotion2: use av_mallocz()
Fixes use of uninitialized values.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:25:04 +01:00
Michael Niedermayer
e49c2aab80 truemotion2: clear the token array if its initialization fails.
Fixes use of uninitialized and half initialized values, which
can occur on several error pathes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:24:08 +01:00
Michael Niedermayer
b89815f519 mvdec: check channel count.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 23:06:49 +01:00
Michael Niedermayer
e6cc3c869b mvdec: minor simplification, remove av_inv_q()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 22:52:23 +01:00
Michael Niedermayer
4c9f35bb7c mvdec: use avpriv_set_pts_info() instead of directly setting tb.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 22:41:09 +01:00
Michael Niedermayer
1bb05797ec sanm: remove "duplicate" for loop.
Fixes input buffer overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 22:29:23 +01:00
Michael Niedermayer
49b729d3af sanm: check image dimensions before using them
Avoids integer overflows and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 21:39:56 +01:00
Paul B Mahol
c4274d118b lagarith: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-22 19:48:23 +00:00
Stefano Sabatini
5b10c5e7e4 lavfi/showwaves: fix check on showwaves->outpicref
outpicref is not always in synch with showwaves->outpicref, which is
changed as a side effect of the call to functions.

Fix regression introduced in 5f634480d1,
+10l to me.
2013-01-22 20:34:29 +01:00
Carl Eugen Hoyos
379d03b0c9 Fix compilation with --disable-everything --enable-demuxer=loas 2013-01-22 20:28:31 +01:00
Matthieu Bouron
c114414a57 lavf/aiffenc: ID3 tags support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 20:27:05 +01:00
Stefano Sabatini
30a40d4a55 lavf/segment: provide link to HTML M3U8 draft, also fix mentioned version in docs 2013-01-22 20:25:45 +01:00
Stefano Sabatini
7694533fda doc/muxers: remove outdated comment about live flags for the segment muxer
The live flags is currently unused, but still kept for backward
compatibility reasons (and in case it turns to be useful again for
whatever reason).
2013-01-22 20:25:33 +01:00
Carl Eugen Hoyos
40297a8bdb Support solid gray frames when decoding Lagarith.
Fixes bug 431.
2013-01-22 20:17:53 +01:00
James Almer
e65d8509f0 libm: Add fallback definition for cbrt() using pow()
The function is known to be missing in at least one target (MSVC).

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 16:02:31 +01:00
Michael Niedermayer
26345acb0e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  proresdec: support mixed interlaced/non-interlaced content
  vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 15:33:23 +01:00
Michael Niedermayer
9774251c45 rtpenc: do not use random values for seq when bitexact is requested.
Fixes fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 14:40:18 +01:00
Michael Niedermayer
73b59cc1ba Merge commit '4f56e773fe8a554b8c2662650aaf799c2ece2721'
* commit '4f56e773fe8a554b8c2662650aaf799c2ece2721':
  x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly
  rtpenc: Start the sequence numbers from a random offset

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 14:27:48 +01:00
Michael Niedermayer
eb2f499e37 Merge commit '9146e872c643fb8f20f9043f1b93a3cddfad15c6'
* commit '9146e872c643fb8f20f9043f1b93a3cddfad15c6':
  Revert "fate: Use wmv2 IDCT for wmv2 tests"

Conflicts:
	tests/fate-run.sh
	tests/fate/vcodec.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 14:09:59 +01:00
Michael Niedermayer
766f055201 Merge commit '4af5310d29379283553bcd9f541a3f6c317f706e'
* commit '4af5310d29379283553bcd9f541a3f6c317f706e':
  get_bits/put_bits: K&R formatting cosmetics

Conflicts:
	libavcodec/get_bits.h
	libavcodec/put_bits.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 13:49:45 +01:00
Michael Niedermayer
b4a7f4d018 Merge commit '570a4a0189946c2c983da41d37fdd67fa13266e7'
* commit '570a4a0189946c2c983da41d37fdd67fa13266e7':
  avidec: use sensible error codes instead of -1

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 13:38:20 +01:00
Michael Smith
0881cbf314 proresdec: support mixed interlaced/non-interlaced content
Set interlaced to false if we don't have an interlaced frame

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-22 05:40:57 +01:00
Michael Niedermayer
0a84174f2d mov: prevent double free if the caller replaces the io context.
Fixes Ticket2148

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 05:15:47 +01:00
Michael Niedermayer
b3ab281027 avcodec/x86/cabac: workaround llvm 4.2.1 bug
x86_64 is affected by this too
Fixes Ticket2156

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 03:43:29 +01:00
Ronald S. Bultje
4a73fbd9c5 vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.
The function is only used in VP3 and VP5, so no need to have it in
DSPContext.
2013-01-21 18:08:55 -08:00
Michael Niedermayer
2338af0fb4 doc: document aresample:first_pts
Documentation copied from asyncts, the options are supposed to do
the same thing. If not please submit a testcase where they differ
so we can fix it.

Disscussed-with: saste on IRC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 01:38:55 +01:00
Diego Biurrun
4f56e773fe x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly
CC: libav-stable@libav.org
2013-01-21 23:54:32 +01:00
Martin Storsjö
ab587f39b2 rtpenc: Start the sequence numbers from a random offset
Expose the current sequence number via an AVOption - this can
be used both for setting the initial sequence number, or for
querying the current number.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-22 00:25:38 +02:00
Michael Niedermayer
e4eebc2da9 avf_showwaves: fix null pointer dereference
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 23:00:20 +01:00
Michael Niedermayer
03a82d588b doc/swr: More verbose description of the force resample flag.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 22:45:58 +01:00
Michael Niedermayer
c5f9cc9636 doc/swr: elaborate on what the LFE mix level is.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 21:48:34 +01:00
Michael Niedermayer
ace74b2122 doc/swr: typo fix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 21:46:48 +01:00
Michael Niedermayer
e0f208a637 doc/swr: docu lfe mix level unit & range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 21:44:39 +01:00
Michael Niedermayer
4606183262 doc/swr: try to fix non english "inclusively included between"
Googling this term has 9 hits, 7 from ffmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 21:41:07 +01:00
Michael Niedermayer
83440f40ba doc/swr: Mention that the internal sample format is choosen automatically if not set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 21:16:43 +01:00
Michael Niedermayer
2dd07518af docs/swr: better used_channel_count docs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 21:14:27 +01:00
Michael Niedermayer
05340be97b img2dec: support seeking in infinitely looped stream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 19:53:41 +01:00
Luca Barbato
9146e872c6 Revert "fate: Use wmv2 IDCT for wmv2 tests"
This reverts commit ce378f0dd0.
2013-01-21 19:43:53 +01:00
Stefano Sabatini
0f2d4eddd8 doc/muxers: extend and clarify documentation for the segment muxer time options 2013-01-21 19:26:44 +01:00
Stefano Sabatini
4630dfd1eb lavf/hlsenc: append last incomplete segment when closing the output
Also introduce missing check on PTS value in case of NOPTS value.
2013-01-21 19:21:21 +01:00
Michael Niedermayer
aeef76b383 dsputil: CONFIG_DWT doesnt exist anymore
place snow dwt init under correct checks
should fix compilation with enable-random

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 19:09:16 +01:00
Michael Niedermayer
5b95d39ee1 vp3: fix compilation with a disabled theora
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 19:04:34 +01:00
Diego Biurrun
4af5310d29 get_bits/put_bits: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-21 17:03:41 +01:00
Michael Niedermayer
ed37a566c9 oggdec: remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 16:41:50 +01:00
Michael Niedermayer
f6a80d6e63 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputilenc: x86: Convert pixel inline asm to yasm
  libgsm: detect libgsm header path

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 16:34:37 +01:00
Michael Niedermayer
cf4515ecd9 Merge commit 'ce378f0dd0c4e5350b3280e6b3e8d6b46fe4b0a3'
* commit 'ce378f0dd0c4e5350b3280e6b3e8d6b46fe4b0a3':
  fate: Use wmv2 IDCT for wmv2 tests
  vorbisdsp: change block_size type from int to intptr_t.

Conflicts:
	tests/fate-run.sh
	tests/fate/vcodec.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 16:28:04 +01:00
Paul B Mahol
6ea8a830e8 afade filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-21 15:20:42 +00:00