BRoster: dereference symlinks when building RosterAppInfo

Should fix #15313

Change-Id: Ibd1d4f4195d794841ecddf3534177982cf894bcb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1803
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2019-08-30 19:20:06 +00:00
committed by waddlesplash
parent e8f5d1ca66
commit df6cc9b5c9
+6 -1
View File
@@ -10,6 +10,9 @@
#include <new>
#include <string.h>
#include <Entry.h>
#include <SupportDefs.h>
using std::nothrow;
@@ -33,7 +36,9 @@ RosterAppInfo::Init(thread_id thread, team_id team, port_id port, uint32 flags,
this->team = team;
this->port = port;
this->flags = flags;
this->ref = *ref;
BEntry entry(ref, true);
if (entry.GetRef(&this->ref) != B_OK)
this->ref = *ref;
if (signature)
strlcpy(this->signature, signature, B_MIME_TYPE_LENGTH);
else