aboutsummaryrefslogtreecommitdiff
path: root/Marshal_NV_ReadPublic.c
diff options
context:
space:
mode:
Diffstat (limited to 'Marshal_NV_ReadPublic.c')
-rw-r--r--Marshal_NV_ReadPublic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Marshal_NV_ReadPublic.c b/Marshal_NV_ReadPublic.c
index df7a7d6..1a0f4a6 100644
--- a/Marshal_NV_ReadPublic.c
+++ b/Marshal_NV_ReadPublic.c
@@ -42,6 +42,9 @@ TPM_RC NV_ReadPublic_In_Unmarshal(NV_ReadPublic_In* target,
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->nvIndex = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}