From 40b175ef4457eeb35a22c1792a5684cc8633aa38 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Apr 2014 16:27:10 +0000 Subject: [PATCH] removed uninitialised memory read git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7239 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../libretroshare/gxs/common/data_support.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/unittests/libretroshare/gxs/common/data_support.cc b/tests/unittests/libretroshare/gxs/common/data_support.cc index 9e53f6c4b..0e2fee38c 100644 --- a/tests/unittests/libretroshare/gxs/common/data_support.cc +++ b/tests/unittests/libretroshare/gxs/common/data_support.cc @@ -124,19 +124,26 @@ void init_item(RsGxsMsgMetaData* metaMsg) init_random(metaMsg->mGroupId) ; init_random(metaMsg->mMsgId) ; + metaMsg->refcount = 1; init_random(metaMsg->mThreadId) ; init_random(metaMsg->mParentId) ; - init_random(metaMsg->mAuthorId) ; init_random(metaMsg->mOrigMsgId) ; - - randString(SHORT_STR, metaMsg->mMsgName); + init_random(metaMsg->mAuthorId) ; init_item(metaMsg->signSet); + randString(SHORT_STR, metaMsg->mServiceString); + + randString(SHORT_STR, metaMsg->mMsgName); + metaMsg->mPublishTs = rand()%313; metaMsg->mMsgFlags = rand()%224; metaMsg->mMsgStatus = rand()%4242; metaMsg->mChildTs = rand()%221; + metaMsg->recvTS = rand()%2327 ; + + init_random(metaMsg->mHash) ; + metaMsg->validated = true ; }