mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-12 04:49:32 +08:00
(ElgFormat.Reader): check output boundary.
This commit is contained in:
parent
71c6623918
commit
e6dd091316
@ -155,7 +155,7 @@ namespace GameRes.Formats.Lucifen
|
|||||||
void UnpackIndexed (byte[] output)
|
void UnpackIndexed (byte[] output)
|
||||||
{
|
{
|
||||||
int dst = 0;
|
int dst = 0;
|
||||||
for (;;)
|
while (dst < m_output.Length)
|
||||||
{
|
{
|
||||||
byte flags = m_input.ReadByte();
|
byte flags = m_input.ReadByte();
|
||||||
if (0xff == flags)
|
if (0xff == flags)
|
||||||
@ -228,7 +228,7 @@ namespace GameRes.Formats.Lucifen
|
|||||||
void UnpackRGBA ()
|
void UnpackRGBA ()
|
||||||
{
|
{
|
||||||
int dst = 0;
|
int dst = 0;
|
||||||
for (;;)
|
while (dst < m_output.Length)
|
||||||
{
|
{
|
||||||
byte flags = m_input.ReadByte();
|
byte flags = m_input.ReadByte();
|
||||||
if (0xff == flags)
|
if (0xff == flags)
|
||||||
@ -439,7 +439,7 @@ namespace GameRes.Formats.Lucifen
|
|||||||
void UnpackRGB ()
|
void UnpackRGB ()
|
||||||
{
|
{
|
||||||
int dst = 0;
|
int dst = 0;
|
||||||
for (;;)
|
while (dst < m_output.Length)
|
||||||
{
|
{
|
||||||
byte flags = m_input.ReadByte();
|
byte flags = m_input.ReadByte();
|
||||||
if (0xff == flags)
|
if (0xff == flags)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user