check pstat in PostProvisioningStatus 19/27919/2
authorOleksandr Dmytrenko <o.dmytrenko@samsung.com>
Fri, 8 Feb 2019 11:51:10 +0000 (13:51 +0200)
committerAleksey Volkov <a.volkov@samsung.com>
Tue, 12 Feb 2019 18:03:45 +0000 (18:03 +0000)
check pstat is null before referencing in PostProvisioningStatus

Change-Id: I57c9f5088ceb762930056879c6db16b2b80e9530
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
resource/csdk/security/provisioning/src/ownershiptransfermanager.c

index aa1c368..be952e9 100644 (file)
@@ -2794,6 +2794,7 @@ OCStackResult PostProvisioningStatus(OTMContext_t* otmCtx)
 
     VERIFY_NOT_NULL_RETURN(TAG, otmCtx, ERROR, OC_STACK_INVALID_PARAM);
     VERIFY_NOT_NULL_RETURN(TAG, otmCtx->selectedDeviceInfo, ERROR, OC_STACK_INVALID_PARAM);
+    VERIFY_NOT_NULL_RETURN(TAG, otmCtx->selectedDeviceInfo->pstat, ERROR, OC_STACK_INVALID_PARAM);
 
     OCProvisionDev_t* deviceInfo = otmCtx->selectedDeviceInfo;
     // Change the TAKE_OWNER bit of TM to 0 (optional in Client Directed)