Commit Graph

23 Commits

Author SHA1 Message Date
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
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
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
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
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
Diego Biurrun
c68fafe0d2 doxygen: eliminate Qt-style doxygen syntax 2011-12-05 13:06:58 +01: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
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