Page 1 of 1

DecodeSFSObject Exception!

Posted: 18 May 2013, 13:36
by scofy

Code: Select all

ISFSObject* DefaultSFSDataSerializer::DecodeSFSObject(ByteArray* buffer)
{
	SFSObject* sfsObject = SFSObject::NewInstance();
						
	// Get tpyeId
	unsigned char headerByte;
	buffer->ReadByte(headerByte);
						
	// Validate typeId
	if (headerByte != (unsigned char)SFSDATATYPE_SFS_OBJECT) 
	{
		string* err = new string();

		string* format = new string("Invalid SFSDataType. Expected: %d, found: %d");
		StringFormatter<long int, unsigned char> (err, format, SFSDATATYPE_SFS_OBJECT, headerByte);

		delete format;
		format = NULL;

		boost::shared_ptr<SFSCodecError> exception(new SFSCodecError(err));
		throw exception;
	}
While client receive a big packet and decode,it will throw a exception.In this scenario,the buffer size is 1984 bytes,and client crash.
+ px 0x03763338 {message=0x03782880 "Invalid SFSDataType. Expected: 18, found: 120" } Sfs2X::Exceptions::SFSCodecError *

Re: DecodeSFSObject Exception!

Posted: 20 May 2013, 06:51
by bqlf1907
No one answers???

Re: DecodeSFSObject Exception!

Posted: 20 May 2013, 07:27
by Bax
The issue is being investigated.

Re: DecodeSFSObject Exception!

Posted: 21 May 2013, 08:28
by Bax