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

40 Commits

Author SHA1 Message Date
Ruoyu
c44d8d9552 avutil/lzo: fix resource leak
Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-11 12:15:26 +02:00
Michael Niedermayer
9326caa5fa avutil/lzo: allow selecting the compression function in the test code 2014-06-24 00:32:34 +02:00
Michael Niedermayer
957457a044 Merge commit 'ccda51b14c0fcae2fad73a24872dce75a7964996'
* commit 'ccda51b14c0fcae2fad73a24872dce75a7964996':
  lzo: Handle integer overflow

Conflicts:
	libavutil/lzo.c

This is basically not merging changes due to this being fixed differently
in FFmpeg

See: d6af26c55c
See: cf2b7c01f8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 14:52:54 +02:00
Michael Niedermayer
cf2b7c01f8 avutil/lzo: add asserts to be double sure against overflows
These asserts cannot fail since d6af26c55c

Based-on: ccda51b14c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 14:51:39 +02:00
Michael Niedermayer
d6af26c55c avutil/lzo: Fix integer overflow
Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)

Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 14:18:20 +02:00
Luca Barbato
ccda51b14c lzo: Handle integer overflow
get_len can overflow for specially crafted payload.

Reported-By: Don A. Baley <donb@securitymouse.com>
CC: libav-stable@libav.org
2014-06-23 10:20:57 +02:00
Michael Niedermayer
aef816f957 Merge commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6'
* commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6':
  lzo: fix overflow checking in copy_backptr()
  flacdec: simplify bounds checking in flac_probe()
  atrac3: avoid oversized shifting in decode_bytes()

Conflicts:
	libavformat/flacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 14:10:09 +01:00
Xi Wang
ca6c3f2c53 lzo: fix overflow checking in copy_backptr()
The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:52:31 +01:00
Michael Niedermayer
aa604e8e33 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avutil: Make LZO decoder code configure-time selectable
  avutil: Move memcpy_backptr() to mem.c
  configure: detect parisc64 automatically
  configure: detect ppc64 automatically
  configure: detect mips64 automatically
  configure: generalise 64-bit test
  smoothstreamingenc: Don't assume streams start from timestamp 0

Conflicts:
	configure
	libavutil/Makefile
	libavutil/lzo.c
	libavutil/lzo.h
	libavutil/mem.c
	libavutil/mem.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 13:15:58 +02:00
Diego Biurrun
5bac2d0c30 avutil: Move memcpy_backptr() to mem.c
The function is used elsewhere and does not belong with the LZO code.
2012-10-25 11:36:57 +02:00
Michael Niedermayer
5cf794e0c1 Merge commit 'd82f188504410fdfa446c5682c128c31bb5851a4'
* commit 'd82f188504410fdfa446c5682c128c31bb5851a4':
  Remove need for padding in av_memcpy_backptr()

Conflicts:
	libavutil/lzo.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 14:10:44 +02:00
Michael Niedermayer
5555d2075a Merge commit 'ceb754d041f5f6327fd9195a5f43575af9516daa'
* commit 'ceb754d041f5f6327fd9195a5f43575af9516daa':
  lzo: Use AV_COPY*U macros where appropriate
  prepare 9_beta2 release
  dsputil: Replace AV_WNxx(AV_RNxx()) combinations by AV_COPYxxU
  intreadwrite: Add AV_COPYxxU macros for copying to/from unaligned addresses
  dxtory: Replace AV_WN16A(AV_RN16A()) combination by AV_COPY16
  mp3: properly forward mp_decode_frame errors

Conflicts:
	RELEASE
	libavcodec/mpegaudiodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 14:01:36 +02:00
Mans Rullgard
d82f188504 Remove need for padding in av_memcpy_backptr()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 18:57:24 +01:00
Diego Biurrun
ceb754d041 lzo: Use AV_COPY*U macros where appropriate 2012-10-23 18:45:50 +02:00
Michael Niedermayer
6912e7a008 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Group math functions into a separate variable
  avutil/mem: K&R formatting cosmetics
  avutil/lzo: K&R formatting cosmetics

Conflicts:
	configure
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 13:18:59 +02:00
Michael Niedermayer
04c6ecb7da Merge commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed'
* commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed':
  fate-vc1: add dependencies
  ARM: fix overreads in neon h264 chroma mc
  rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
  gitignore: ignore files created by msvc
  fate: Add proper dependencies for the tests in video.mak
  configure: Disable Snow decoder and encoder by default
  lzo: Drop obsolete fast_memcpy reference
  build: Drop OBJS declaration for non-existing PCM_DVD encoder
  mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all

Conflicts:
	libavcodec/mpegvideo.c
	libavformat/rtsp.c
	tests/fate/microsoft.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 12:37:52 +02:00
Diego Biurrun
c08536979b avutil/lzo: K&R formatting cosmetics 2012-10-20 02:34:29 +02:00
Diego Biurrun
8fb1e26405 lzo: Drop obsolete fast_memcpy reference 2012-10-19 17:04:41 +02:00
Diego Biurrun
193d7eea95 libavutil: Remove broken and pointless lzo test program. 2012-03-26 13:00:09 +02:00
Reimar Döffinger
874da652b3 Avoid av_memcpy_backptr hang without extra branch.
This only happens for a "back" value of 0 which is invalid anyway,
but lcldec does not properly validate input.
Also extend the documentation to specify valid values.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-12-30 10:37:33 +01:00
Michael Niedermayer
58c41799ab lzo: fix memcpy_backptr() with 0 offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-24 18:42:55 +01:00
Michael Niedermayer
b404ab9e74 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov: Don't av_malloc(0).
  avconv: only allocate 1 AVFrame per input stream
  avconv: fix memleaks due to not freeing the AVFrame for audio
  h264-fate: remove -strict 1 except where necessary (mr4/5-tandberg).
  misc Doxygen markup improvements
  doxygen: eliminate Qt-style doxygen syntax
  g722: Add a regression test for muxing/demuxing in wav
  g722: Change bits per sample to 4
  g722dec: Signal skipping the lower bits via AVOptions instead of bits_per_coded_sample
  api-example: update to use avcodec_decode_audio4()
  avplay: use avcodec_decode_audio4()
  avplay: use a separate buffer for playing silence
  avformat: use avcodec_decode_audio4() in avformat_find_stream_info()
  avconv: use avcodec_decode_audio4() instead of avcodec_decode_audio3()
  mov: Allow empty stts atom.
  doc: document preferred Doxygen syntax and make patcheck detect it

Conflicts:
	avconv.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/version.h
	libavformat/mov.c
	tests/codec-regression.sh
	tests/fate/h264.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-06 01:37:27 +01:00
Diego Biurrun
c68fafe0d2 doxygen: eliminate Qt-style doxygen syntax 2011-12-05 13:06:58 +01:00
Reimar Döffinger
b9242fd12f av_lzo1x_decode: properly handle negative buffer length.
Treating them like 0 is safest, current code would invoke
undefined pointer arithmetic behaviour in this case.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-05 23:25:20 +01:00
Michael Niedermayer
686959e87e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: Consistently use '@' instead of '\' for Doxygen markup.
  Use av_printf_format to check the usage of printf style functions
  Add av_printf_format, for marking printf style format strings and their parameters
  ARM: enable thumb for Cortex-M* CPUs
  nsvdec: Propagate error values instead of returning 0 in nsv_read_header().
  build: remove SRC_PATH_BARE variable
  build: move basic rules and variables to main Makefile
  build: move special targets to end of main Makefile
  lavdev: improve feedback in case of invalid frame rate/size
  vfwcap: prefer "framerate_q" over "fps" in vfw_read_header()
  v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters()
  fbdev: prefer "framerate_q" over "fps" in device context
  bktr: prefer "framerate" over "fps" for grab_read_header()
  ALSA: implement channel layout for playback.
  alsa: support unsigned variants of already supported signed formats.
  alsa: add support for more formats.
  ARM: allow building in Thumb2 mode

Conflicts:
	common.mak
	doc/APIchanges
	libavcodec/vdpau.h
	libavdevice/alsa-audio-common.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-24 03:07:04 +02:00
Diego Biurrun
adbfc605f6 doxygen: Consistently use '@' instead of '\' for Doxygen markup.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-24 00:37:49 +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
Reimar Döffinger
032f406864 Handle input or output len of 0 properly in lzo decoder.
(cherry picked from commit 7d5082600e)
2011-01-24 21:25:43 +01:00
Reimar Döffinger
7d5082600e Handle input or output len of 0 properly in lzo decoder. 2011-01-24 18:52:08 +01:00
Diego Biurrun
985fdd534f Give liblzo benchmark conditionals more descriptive names and add convenience
definitions along with instructions for changing them.

Originally committed as revision 18387 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-09 15:11:48 +00:00
Diego Biurrun
82a6ef2089 Replace manual setting of the removed av_log_level variable by the
corresponding call to av_log_set_level().

Originally committed as revision 18310 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-02 08:15:03 +00:00
Reimar Döffinger
fe4032b66a Remove more functions disabled by major version bump.
Originally committed as revision 17876 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-08 15:02:12 +00:00
Diego Biurrun
0d08e27015 Add necessary header for LIBAVUTIL_VERSION_MAJOR, fixes the warning:
libavutil/lzo.c:235:5: warning: "LIBAVUTIL_VERSION_MAJOR" is not defined

Originally committed as revision 16962 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-02 23:13:18 +00:00
Reimar Döffinger
a545f067f3 Move doxygen documentation from lzo.c to lzo.h
Originally committed as revision 16949 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-02 20:30:36 +00:00
Reimar Döffinger
0b178e5629 Add av_ prefix to LZO stuff and thus make it officially part of the public API.
Keep lzo1x_decode until the next major version bump for binary compatibility.

Originally committed as revision 16946 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-02 20:16:00 +00:00
Diego Biurrun
bfe3676feb spelling/grammar/consistency review part II
Originally committed as revision 16848 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-28 23:03:17 +00:00
Diego Biurrun
89c9ff504b spelling/grammar/consistency review part I
Originally committed as revision 16840 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-28 00:16:05 +00:00
Peter Ross
6ba10f338a Add av_memcpy_backptr(): deliberately overlapping memcpy variant.
Originally committed as revision 14641 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-06 08:17:03 +00:00
Reimar Döffinger
5e038b4f08 LZO decoder input is const
Originally committed as revision 11797 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-02-01 16:30:51 +00:00
Reimar Döffinger
4302963daa Move lzo decompression to libavutil
Originally committed as revision 7789 to svn://svn.ffmpeg.org/ffmpeg/trunk
2007-01-31 22:58:53 +00:00