size_t CxMemFile::Read(void *buffer, size_t size, size_t count)
{
	if (buffer==NULL) return 0;

	if (m_pBuffer==NULL) return 0;
	if (m_Position >= (int32_t)m_Size){
		m_bEOF = true;
		return 0;
	}

	int32_t nCount = (int32_t)(count*size);
	if (nCount == 0) return 0;

	int32_t nRead;
	if (m_Position + nCount > (int32_t)m_Size){
		m_bEOF = true;
		nRead = (m_Size - m_Position);
	} else
		nRead = nCount;

	memcpy(buffer, m_pBuffer + m_Position, nRead);
	m_Position += nRead;

	return (size_t)(nRead/size);
}

The software allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.