Subversion Repositories spk

Rev

Rev 40 | Rev 43 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 40 Rev 41
Line 1652... Line 1652...
1652
	if ( uncomprLen > (datasize * 100) )
1652
	if ( uncomprLen > (datasize * 100) )
1653
	{
1653
	{
1654
		*len = 0;
1654
		*len = 0;
1655
		return NULL;
1655
		return NULL;
1656
	}
1656
	}
1657
	unsigned char *uncompr = new unsigned char[uncomprLen];
1657
	unsigned char *uncompr = new unsigned char[uncomprLen + 1];
1658
	if ( !uncompr ) 
1658
	if ( !uncompr ) 
1659
		return NULL;
1659
		return NULL;
1660
	memset ( uncompr, 0, sizeof(uncompr) );
1660
	memset ( uncompr, 0, sizeof(uncompr) );
1661
 
1661
 
1662
 
1662
 
Line 1693... Line 1693...
1693
		*len = 0;
1693
		*len = 0;
1694
		return NULL;
1694
		return NULL;
1695
	}
1695
	}
1696
 
1696
 
1697
	*len = uncomprLen;
1697
	*len = uncomprLen;
1698
	uncompr[uncomprLen - 1] = '\0';
1698
	uncompr[uncomprLen] = '\0';
1699
	return uncompr;
1699
	return uncompr;
1700
}
1700
}
1701
 
1701
 
1702
bool IsDataPCK ( const unsigned char *data, size_t size )
1702
bool IsDataPCK ( const unsigned char *data, size_t size )
1703
{
1703
{