# HG changeset patch # User reimar # Date 1243791875 0 # Node ID 05b6cba2c95bd1fd7cb509b790485485292c7a6c # Parent 9f3ef4eea41a597a3d611dc687ecad620eec7080 lcldec: ensure that the offset for av_memcpy_backptr is valid. diff -r 9f3ef4eea41a -r 05b6cba2c95b lcldec.c --- a/lcldec.c Sun May 31 11:47:52 2009 +0000 +++ b/lcldec.c Sun May 31 17:44:35 2009 +0000 @@ -93,6 +93,7 @@ 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);