[FFmpeg-cvslog] r19067 - trunk/libavcodec/lcldec.c

reimar subversion
Sun May 31 19:44:35 CEST 2009


Author: reimar
Date: Sun May 31 19:44:35 2009
New Revision: 19067

Log:
lcldec: ensure that the offset for av_memcpy_backptr is valid.

Modified:
   trunk/libavcodec/lcldec.c

Modified: trunk/libavcodec/lcldec.c
==============================================================================
--- trunk/libavcodec/lcldec.c	Sun May 31 18:30:12 2009	(r19066)
+++ trunk/libavcodec/lcldec.c	Sun May 31 19:44:35 2009	(r19067)
@@ -93,6 +93,7 @@ static unsigned int mszh_decomp(const un
             unsigned ofs = bytestream_get_le16(&srcptr);
             unsigned cnt = (ofs >> 11) + 1;
             ofs &= 0x7ff;
+            ofs = FFMIN(ofs, destptr - destptr_bak);
             cnt *= 4;
             cnt = FFMIN(cnt, destptr_end - destptr);
             av_memcpy_backptr(destptr, ofs, cnt);



More information about the ffmpeg-cvslog mailing list