* fReplyTo.target (the handler token) is internally checked even, if the
preferred handler is addressed. So make sure, it has a usable value in this case, otherwise ReturnAddress() usually won't work. * If the message to be read from the port is bigger than the on-stack buffer, the chunk of memory to be allocated on the heap has to be the size of the message, not the size of the on-stack buffer. This caused all kind of nasty, hard-trackable problems. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c5c962d426
commit
c9f9a6b20d
@ -1790,7 +1790,8 @@ status_t BMessage::_send_(port_id port, int32 token, bool preferred,
|
||||
self->fReplyRequired = reply_required;
|
||||
self->fReplyTo.team = reply_to.fTeam;
|
||||
self->fReplyTo.port = reply_to.fPort;
|
||||
self->fReplyTo.target = reply_to.fHandlerToken;
|
||||
self->fReplyTo.target = (reply_to.fPreferredTarget
|
||||
? B_PREFERRED_TOKEN : reply_to.fHandlerToken);
|
||||
self->fReplyTo.preferred = reply_to.fPreferredTarget;
|
||||
|
||||
char tmp[0x800];
|
||||
@ -1928,7 +1929,7 @@ static status_t handle_reply(port_id reply_port,
|
||||
}
|
||||
else
|
||||
{
|
||||
pAllocd = new char[0x800];
|
||||
pAllocd = new char[err];
|
||||
pMem = pAllocd;
|
||||
}
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user