* Micheals patch alone didn't fix the problem.
I'm also wondering where those exceptions are actually caught. * when unflattening into a message, MakeEmpty() will be called on it first. This will actually fix the crashing bug I observed, but it makes me suspicious - there should be an error somewhere else. Something to do with initialization perhaps? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -284,6 +284,8 @@ unflatten_r5_message(uint32 format, BMessage *message, const char *flatBuffer)
|
|||||||
status_t
|
status_t
|
||||||
unflatten_r5_message(uint32 format, BMessage *message, BDataIO *stream)
|
unflatten_r5_message(uint32 format, BMessage *message, BDataIO *stream)
|
||||||
{
|
{
|
||||||
|
message->MakeEmpty();
|
||||||
|
|
||||||
TReadHelper reader(stream);
|
TReadHelper reader(stream);
|
||||||
BMessage::Private messagePrivate(message);
|
BMessage::Private messagePrivate(message);
|
||||||
BMessage::message_header *header = messagePrivate.GetMessageHeader();
|
BMessage::message_header *header = messagePrivate.GetMessageHeader();
|
||||||
@@ -360,6 +362,9 @@ unflatten_r5_message(uint32 format, BMessage *message, BDataIO *stream)
|
|||||||
} else
|
} else
|
||||||
reader(dataSize);
|
reader(dataSize);
|
||||||
|
|
||||||
|
if (dataSize <= 0)
|
||||||
|
return B_ERROR;
|
||||||
|
|
||||||
// name
|
// name
|
||||||
uint8 nameLength;
|
uint8 nameLength;
|
||||||
reader(nameLength);
|
reader(nameLength);
|
||||||
|
|||||||
Reference in New Issue
Block a user