On Mon, 19 Dec 2011, Diego Biurrun wrote:
On Mon, Dec 19, 2011 at 10:02:53AM +0530, Aneesh Dogra wrote:
---
libavcodec/xl.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
xl: fix overread
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -68,6 +68,12 @@ static int decode_frame(AVCodecContext *avctx,
stride = avctx->width - 4;
+
+ if (buf_size < avctx->width * avctx->height)
+ {
+ return AVERROR_INVALIDDATA;
+ }
Place the { on the previous line; better yet, drop the {}.
Better yet, add an error log message.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel