Mercurial > libavcodec.hg
changeset 9781:05b6cba2c95b libavcodec
lcldec: ensure that the offset for av_memcpy_backptr is valid.
author | reimar |
---|---|
date | Sun, 31 May 2009 17:44:35 +0000 |
parents | 9f3ef4eea41a |
children | 66922728d7f7 |
files | lcldec.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);