Commit d840f2c1 authored by Kouji Sasaki's avatar Kouji Sasaki Committed by Alexandre Julliard

Corrected RLE decompression processing.

parent 92000a91
...@@ -1790,18 +1790,18 @@ static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, ...@@ -1790,18 +1790,18 @@ static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst,
while (src < end) while (src < end)
{ {
ch = *src++; ch = *src++;
if (!(ch & 0x7F)) continue;
if (ch & 0x80) if (ch & 0x80)
{ {
ch &= 0x7F; ch &= 0x7F;
if ((*dst) + ch < sdst) if ((*dst) + ch <= sdst)
memcpy(*dst, src, ch); memcpy(*dst, src, ch);
src += ch; src += ch;
} }
else else
{ {
if ((*dst) + ch < sdst) if ((*dst) + ch <= sdst)
memset(*dst, (char)*src++, ch); memset(*dst, (char)*src, ch);
src++;
} }
*dst += ch; *dst += ch;
} }
......
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