Commit 75741fbc authored by reimar's avatar reimar

lcldec: ensure that the offset for av_memcpy_backptr is valid.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19067 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b6984357
......@@ -93,6 +93,7 @@ static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsign
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment