From abad374909e6416e941351094f4f1446a71f8d23 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 17 May 2013 13:08:55 +0200 Subject: jpegls: check the scan offset Prevent an out of array bound write. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org --- libavcodec/jpeglsdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 3616063bf1..df72ca338f 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -306,6 +306,10 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, av_dlog(s->avctx, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n", ilv, point_transform, s->bits, s->cur_scan); if (ilv == 0) { /* separate planes */ + if (s->cur_scan > s->nb_components) { + ret = AVERROR_INVALIDDATA; + goto end; + } off = s->cur_scan - 1; stride = (s->nb_components > 1) ? 3 : 1; width = s->width * stride; -- cgit v1.2.3 From bc8c1cdc7bfe7b1fe56df812aabdac3de2555cec Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 11 Apr 2012 08:31:10 +0200 Subject: lavfi doxy: add a page for lavfi. --- libavfilter/avfilter.h | 15 +++++++++++++++ libavfilter/version.h | 1 + libavutil/avutil.h | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 51d0fb5148..9baf64e941 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -22,6 +22,17 @@ #ifndef AVFILTER_AVFILTER_H #define AVFILTER_AVFILTER_H +/** + * @file + * @ingroup lavfi + * Main libavfilter public API header + */ + +/** + * @defgroup lavfi Libavfilter - graph-based frame editing library + * @{ + */ + #include "libavutil/avutil.h" #include "libavutil/frame.h" #include "libavutil/log.h" @@ -960,4 +971,8 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs); +/** + * @} + */ + #endif /* AVFILTER_AVFILTER_H */ diff --git a/libavfilter/version.h b/libavfilter/version.h index e8dc87546f..c8e968996f 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -23,6 +23,7 @@ /** * @file + * @ingroup lavfi * Libavfilter version macros */ diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 33f9bea723..5ed33a9777 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -35,7 +35,7 @@ * provided by Libav. * * @li @ref libavc "libavcodec" encoding/decoding library - * @li @subpage libavfilter graph based frame editing library + * @li @ref lavfi "libavfilter" graph-based frame editing library * @li @ref libavf "libavformat" I/O and muxing/demuxing library * @li @ref lavd "libavdevice" special devices muxing/demuxing library * @li @ref lavu "libavutil" common utility library -- cgit v1.2.3