Fix return value in GetDtlsPskCredentials() 37/20137/2
authorol.beketov <ol.beketov@samsung.com>
Fri, 19 May 2017 11:42:37 +0000 (14:42 +0300)
committerDmitriy Zhuravlev <d.zhuravlev@samsung.com>
Sat, 20 May 2017 06:39:32 +0000 (06:39 +0000)
Fix return value in GetDtlsPskCredentials() from
credresource.c missed in patchset #19785

Change-Id: Id79111409f574ce49f037adb6602a4195666db0c
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20137
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
resource/csdk/security/src/credresource.c

index bbb58ea..c2a4acb 100644 (file)
@@ -2795,6 +2795,7 @@ int32_t GetDtlsPskCredentials(CADtlsPskCredType_t type,
                                     return ret;
                                 }
                                 memcpy(result, cred->privateData.data, len);
+                                ret = (int32_t)len;
                             }
                         }
                         else if(OIC_ENCODING_BASE64 == cred->privateData.encoding)