SVACE: fix UNINIT.CTOR 06/157206/2
authorKrzysztof Dynowski <k.dynowski@samsung.com>
Mon, 23 Oct 2017 15:41:12 +0000 (17:41 +0200)
committerLukasz Kostyra <l.kostyra@samsung.com>
Tue, 24 Oct 2017 08:49:12 +0000 (10:49 +0200)
Change-Id: I4029146e8b408e931b0555bd7e9ac8d61722741f

TEEStub/PropertyAccess/Property.h
TEEStub/PropertyAccess/rapidxml/rapidxml.hpp
TEEStub/TEEStubServer/ConnectionSession.h
simulatordaemon/inc/ConnectionSession.h
simulatordaemon/src/TABinaryManager/rapidxml/rapidxml.hpp
simulatordaemon/src/TAInstance.cpp
ssflib/dep/cryptocore/source/base/cc_bignum.c

index f7413ea2cc528eed594495f621b753907e3fd3e1..80ecb4c7ffac241fd415aa45fd619ced311b18f5 100644 (file)
@@ -54,7 +54,7 @@ public:
        void setPropSet(uintptr_t propset) {\r
                this->propset = propset;\r
        };\r
-       Property() {\r
+       Property() : propset(0) {\r
        }\r
        ;\r
        virtual ~Property() {\r
index 73a2b780abcb935faef5a6f62b249a32cff011cd..f1aa61e00e86b11bc9f8ffab45c6e1823d101fd2 100644 (file)
@@ -617,7 +617,7 @@ public:
 \r
        // Construct a base with empty name, value and parent\r
        xml_base() :\r
-                       m_name(0), m_value(0), m_parent(0) {\r
+                       m_name(0), m_value(0), m_name_size(0), m_value_size(0), m_parent(0) {\r
        }\r
 \r
        ///////////////////////////////////////////////////////////////////////////\r
@@ -756,7 +756,7 @@ public:
 \r
        //! Constructs an empty attribute with the specified type. \r
        //! Consider using memory_pool of appropriate xml_document if allocating attributes manually.\r
-       xml_attribute() {\r
+       xml_attribute() : m_prev_attribute(0), m_next_attribute(0) {\r
        }\r
 \r
        ///////////////////////////////////////////////////////////////////////////\r
@@ -839,7 +839,8 @@ public:
        //! Consider using memory_pool of appropriate document to allocate nodes manually.\r
        //! \param type Type of node to construct.\r
        xml_node(node_type type) :\r
-                       m_type(type), m_first_node(0), m_first_attribute(0) {\r
+                       m_type(type), m_first_node(0), m_last_node(0), m_first_attribute(0), m_last_attribute(0),\r
+                       m_prev_sibling(0), m_next_sibling(0) {\r
        }\r
 \r
        ///////////////////////////////////////////////////////////////////////////\r
index 08df68c959ab0cfa9860846442c8ab24db87c018..0d7b4537f6a10149a6929680cb62b53ae5fc993a 100644 (file)
@@ -52,7 +52,7 @@ class ConnectionSession: public boost::enable_shared_from_this<ConnectionSession
 {
 public:
        ConnectionSession(boost::asio::io_service& io_service) :
-       clientSocket(io_service), command((SIM_COMMAND) -1), taskThread(0)
+       clientSocket(io_service), clientData(), command((SIM_COMMAND) -1), taskThread(0)
        {
        }
        stream_protocol::socket& socket()
index a4794be2495478fa96df9c61c615170ad3e514e8..055bfe807b3a6c89c555a1d3d9168475d7c42afd 100644 (file)
@@ -59,7 +59,7 @@ public:
                return session_ptr(new ConnectionSession(io_service));
        }
        ConnectionSession(boost::asio::io_service& io_service):
-       clientSocket(io_service)
+       clientSocket(io_service), clientData()
        {
                pthread_mutex_init(&connLock, NULL);
                currentState = CMD_READ;
index e3e8981bf516ee69d2c4be1f43aa4eddb8280cdb..0cb31621a9ac190c2d43d9642c9242a56a952ecc 100644 (file)
@@ -617,7 +617,7 @@ public:
 
        // Construct a base with empty name, value and parent
        xml_base() :
-                       m_name(0), m_value(0), m_parent(0) {
+                       m_name(0), m_value(0), m_name_size(0), m_value_size(0), m_parent(0) {
        }
 
        ///////////////////////////////////////////////////////////////////////////
@@ -756,7 +756,7 @@ public:
 
        //! Constructs an empty attribute with the specified type. 
        //! Consider using memory_pool of appropriate xml_document if allocating attributes manually.
-       xml_attribute() {
+       xml_attribute() : m_prev_attribute(0), m_next_attribute(0) {
        }
 
        ///////////////////////////////////////////////////////////////////////////
@@ -839,7 +839,8 @@ public:
        //! Consider using memory_pool of appropriate document to allocate nodes manually.
        //! \param type Type of node to construct.
        xml_node(node_type type) :
-                       m_type(type), m_first_node(0), m_first_attribute(0) {
+                       m_type(type), m_first_node(0), m_last_node(0), m_first_attribute(0), m_last_attribute(0),
+                       m_prev_sibling(0), m_next_sibling(0) {
        }
 
        ///////////////////////////////////////////////////////////////////////////
index 0fecf8ff763bd69f7967b898e944ab5b1064ebb3..7a6f44386e94abce2801f99dd3f498b6ee35168e 100644 (file)
@@ -35,7 +35,7 @@
  * @param client_io_service IO service to handle the connection with TA
  */
 TAInstance::TAInstance(uint32_t pid, bool alive, bool debug, uint32_t InstID, boost::asio::io_service& client_io_service) :
-mTAConnectionSocket(client_io_service) {
+mTAConnectionSocket(client_io_service),readData() {
        LOGD(SIM_DAEMON, "Entry");
 
        // Initialize the lock for Session map (mSessionMap)
@@ -51,6 +51,8 @@ mTAConnectionSocket(client_io_service) {
        mPID = pid;
        mTAInstanceID = InstID;
        mCommandMap.clear();
+       command = COMMANDINVALID;
+       currentState = CMD_READ;
 }
 
 bool TAInstance::checkKeepAlive() {
index 5dc6043be09a7cc5eb611e022e13b0fd28d76655..f36508b620e37a3a25757358bacf5db230ed2b1c 100644 (file)
@@ -1077,15 +1077,14 @@ SDRM_BIG_NUM *SDRM_BN_Alloc(cc_u8* pbSrc, cc_u32 dSize)
 SDRM_BIG_NUM *SDRM_BN_Init(cc_u32 dSize)
 {
        cc_u32                  AllocSize = sizeof(SDRM_BIG_NUM) + dSize * SDRM_SIZE_OF_DWORD;
-       cc_u8                   *pbBuf = (cc_u8*)malloc(AllocSize);
-       SDRM_BIG_NUM    *BN_Src = (SDRM_BIG_NUM*)(void*)pbBuf;
+       SDRM_BIG_NUM    *BN_Src = (SDRM_BIG_NUM*)malloc(AllocSize);
        if (BN_Src == NULL)
        {
                return NULL;
        }
 
        memset(BN_Src, 0, AllocSize);
-       BN_Src->pData = (cc_u32*)(void*)(pbBuf + sizeof(SDRM_BIG_NUM));
+       BN_Src->pData = (cc_u32*)(void*)((char*)BN_Src + sizeof(SDRM_BIG_NUM));
        BN_Src->Size = dSize;
 
        return BN_Src;
@@ -3107,8 +3106,8 @@ cc_u8 * SDRM_BN2STRFOUR(cc_u32 *numberBits, SDRM_BIG_NUM *BN_Src)
        num = SDRM_BN_Init(BN_Src->Size);
     if( num == NULL)//fix prevent cid = 89093 by guoxing.xu
     {
-               free(num);
                free(strDestTemp);
+               SDRM_BN_FREE(tempREM);
         SDRM_BN_FREE(d);
         return NULL;
     }