src/lsdb: fix heap buffer overflow

refs: #4217

Change-Id: I902dfd7fcb856b5fd5cd285ef4d498956029848e
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 61a23f5..9173b89 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -1154,7 +1154,8 @@
     originRouter.append(dataName.getSubName(lsaPosition + 1, dataName.size() - lsaPosition - 3));
 
     uint64_t seqNo = dataName[-1].toNumber();
-    std::string dataContent(reinterpret_cast<const char*>(data->getContent().value()));
+    std::string dataContent(reinterpret_cast<const char*>(data->getContent().value()),
+                            data->getContent().value_size());
 
     std::string interestedLsType  = dataName[-2].toUri();