From 3144d1b4bbf523b80fa04ba61787d9366ccc0443 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 10 Aug 2015 23:33:03 +0200 Subject: Do a safe copy by passing in the size --- common/domain/applicationdomaintype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index ad2d7a1..29bebcf 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -74,7 +74,7 @@ public: //TODO only copy requested properties auto memoryAdaptor = QSharedPointer::create(*(domainType.mAdaptor)); //The identifier still internal refers to the memory-mapped pointer, we need to copy the memory or it will become invalid - return QSharedPointer::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData()), domainType.mRevision, memoryAdaptor); + return QSharedPointer::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); } virtual ~ApplicationDomainType() {} -- cgit v1.2.3