report error if input buffer is larger than expected
am: 3dfffca12c
* commit '3dfffca12cb483bee81b6f65b6aeed027204b8f1':
report error if input buffer is larger than expected
diff --git a/Marshal_ActivateCredential.c b/Marshal_ActivateCredential.c
index 242d485..dd81ced 100644
--- a/Marshal_ActivateCredential.c
+++ b/Marshal_ActivateCredential.c
@@ -51,6 +51,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Certify.c b/Marshal_Certify.c
index 84a9515..832e62c 100644
--- a/Marshal_Certify.c
+++ b/Marshal_Certify.c
@@ -52,6 +52,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_CertifyCreation.c b/Marshal_CertifyCreation.c
index 3a36a40..02e93d8 100644
--- a/Marshal_CertifyCreation.c
+++ b/Marshal_CertifyCreation.c
@@ -60,6 +60,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ChangeEPS.c b/Marshal_ChangeEPS.c
index 0abe0db..5efd9e1 100644
--- a/Marshal_ChangeEPS.c
+++ b/Marshal_ChangeEPS.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ChangePPS.c b/Marshal_ChangePPS.c
index c896e20..95df1e9 100644
--- a/Marshal_ChangePPS.c
+++ b/Marshal_ChangePPS.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Clear.c b/Marshal_Clear.c
index e5b8ad8..f079242 100644
--- a/Marshal_Clear.c
+++ b/Marshal_Clear.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ClearControl.c b/Marshal_ClearControl.c
index d1f1e22..9f138c4 100644
--- a/Marshal_ClearControl.c
+++ b/Marshal_ClearControl.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ClockRateAdjust.c b/Marshal_ClockRateAdjust.c
index ce2fda4..099d5fc 100644
--- a/Marshal_ClockRateAdjust.c
+++ b/Marshal_ClockRateAdjust.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ClockSet.c b/Marshal_ClockSet.c
index 66fd557..b93a811 100644
--- a/Marshal_ClockSet.c
+++ b/Marshal_ClockSet.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Commit.c b/Marshal_Commit.c
index d09a4b8..146cb19 100644
--- a/Marshal_Commit.c
+++ b/Marshal_Commit.c
@@ -57,6 +57,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ContextLoad.c b/Marshal_ContextLoad.c
index 426cfe9..915191e 100644
--- a/Marshal_ContextLoad.c
+++ b/Marshal_ContextLoad.c
@@ -44,6 +44,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ContextSave.c b/Marshal_ContextSave.c
index 06a3e69..00ec8dd 100644
--- a/Marshal_ContextSave.c
+++ b/Marshal_ContextSave.c
@@ -41,6 +41,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->saveHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Create.c b/Marshal_Create.c
index 7f46d9c..e44e1f8 100644
--- a/Marshal_Create.c
+++ b/Marshal_Create.c
@@ -63,6 +63,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_CreatePrimary.c b/Marshal_CreatePrimary.c
index 96842c1..201feaf 100644
--- a/Marshal_CreatePrimary.c
+++ b/Marshal_CreatePrimary.c
@@ -65,6 +65,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_DictionaryAttackLockReset.c b/Marshal_DictionaryAttackLockReset.c
index 316c0fb..ba43868 100644
--- a/Marshal_DictionaryAttackLockReset.c
+++ b/Marshal_DictionaryAttackLockReset.c
@@ -15,6 +15,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->lockHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_DictionaryAttackParameters.c b/Marshal_DictionaryAttackParameters.c
index 1f215e8..a0dc3d2 100644
--- a/Marshal_DictionaryAttackParameters.c
+++ b/Marshal_DictionaryAttackParameters.c
@@ -28,6 +28,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Duplicate.c b/Marshal_Duplicate.c
index f85853d..c107854 100644
--- a/Marshal_Duplicate.c
+++ b/Marshal_Duplicate.c
@@ -54,6 +54,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ECC_Parameters.c b/Marshal_ECC_Parameters.c
index cfe527d..5511797 100644
--- a/Marshal_ECC_Parameters.c
+++ b/Marshal_ECC_Parameters.c
@@ -45,6 +45,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ECDH_KeyGen.c b/Marshal_ECDH_KeyGen.c
index e81286b..0498342 100644
--- a/Marshal_ECDH_KeyGen.c
+++ b/Marshal_ECDH_KeyGen.c
@@ -42,6 +42,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->keyHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ECDH_ZGen.c b/Marshal_ECDH_ZGen.c
index 84f2e79..958b072 100644
--- a/Marshal_ECDH_ZGen.c
+++ b/Marshal_ECDH_ZGen.c
@@ -46,6 +46,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_EC_Ephemeral.c b/Marshal_EC_Ephemeral.c
index 0c3049f..bf3ca60 100644
--- a/Marshal_EC_Ephemeral.c
+++ b/Marshal_EC_Ephemeral.c
@@ -45,6 +45,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_EncryptDecrypt.c b/Marshal_EncryptDecrypt.c
index 03c9bcf..e37585e 100644
--- a/Marshal_EncryptDecrypt.c
+++ b/Marshal_EncryptDecrypt.c
@@ -59,6 +59,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_EventSequenceComplete.c b/Marshal_EventSequenceComplete.c
index d63e1c5..523bd45 100644
--- a/Marshal_EventSequenceComplete.c
+++ b/Marshal_EventSequenceComplete.c
@@ -47,6 +47,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_EvictControl.c b/Marshal_EvictControl.c
index 9938b18..f31ceb8 100644
--- a/Marshal_EvictControl.c
+++ b/Marshal_EvictControl.c
@@ -21,6 +21,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_FieldUpgradeData.c b/Marshal_FieldUpgradeData.c
index 72087c9..729e025 100644
--- a/Marshal_FieldUpgradeData.c
+++ b/Marshal_FieldUpgradeData.c
@@ -45,6 +45,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_FieldUpgradeStart.c b/Marshal_FieldUpgradeStart.c
index 6f1bc86..e86739f 100644
--- a/Marshal_FieldUpgradeStart.c
+++ b/Marshal_FieldUpgradeStart.c
@@ -24,6 +24,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_FirmwareRead.c b/Marshal_FirmwareRead.c
index c753bca..a09b8fa 100644
--- a/Marshal_FirmwareRead.c
+++ b/Marshal_FirmwareRead.c
@@ -44,6 +44,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_FlushContext.c b/Marshal_FlushContext.c
index 07ead91..ca38423 100644
--- a/Marshal_FlushContext.c
+++ b/Marshal_FlushContext.c
@@ -17,6 +17,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_GetCapability.c b/Marshal_GetCapability.c
index fd29b0b..6794e01 100644
--- a/Marshal_GetCapability.c
+++ b/Marshal_GetCapability.c
@@ -54,6 +54,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_GetCommandAuditDigest.c b/Marshal_GetCommandAuditDigest.c
index a71d6c1..4c63fd5 100644
--- a/Marshal_GetCommandAuditDigest.c
+++ b/Marshal_GetCommandAuditDigest.c
@@ -52,6 +52,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_GetRandom.c b/Marshal_GetRandom.c
index 28b4ef2..b3f3afa 100644
--- a/Marshal_GetRandom.c
+++ b/Marshal_GetRandom.c
@@ -44,6 +44,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_GetSessionAuditDigest.c b/Marshal_GetSessionAuditDigest.c
index ba0d4f5..efa3bfd 100644
--- a/Marshal_GetSessionAuditDigest.c
+++ b/Marshal_GetSessionAuditDigest.c
@@ -53,6 +53,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_GetTime.c b/Marshal_GetTime.c
index a0c9c6c..cb1c210 100644
--- a/Marshal_GetTime.c
+++ b/Marshal_GetTime.c
@@ -52,6 +52,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_HMAC.c b/Marshal_HMAC.c
index 89ec74f..2199d58 100644
--- a/Marshal_HMAC.c
+++ b/Marshal_HMAC.c
@@ -50,6 +50,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_HMAC_Start.c b/Marshal_HMAC_Start.c
index 348521d..0fa4d75 100644
--- a/Marshal_HMAC_Start.c
+++ b/Marshal_HMAC_Start.c
@@ -50,6 +50,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Hash.c b/Marshal_Hash.c
index c084b2c..ff1f4cf 100644
--- a/Marshal_Hash.c
+++ b/Marshal_Hash.c
@@ -53,6 +53,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_HashSequenceStart.c b/Marshal_HashSequenceStart.c
index 004c58f..2d5aa36 100644
--- a/Marshal_HashSequenceStart.c
+++ b/Marshal_HashSequenceStart.c
@@ -48,6 +48,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_HierarchyChangeAuth.c b/Marshal_HierarchyChangeAuth.c
index f50473a..1c5d721 100644
--- a/Marshal_HierarchyChangeAuth.c
+++ b/Marshal_HierarchyChangeAuth.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_HierarchyControl.c b/Marshal_HierarchyControl.c
index a04d2ac..4bf0f39 100644
--- a/Marshal_HierarchyControl.c
+++ b/Marshal_HierarchyControl.c
@@ -23,6 +23,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Import.c b/Marshal_Import.c
index b4dd9fe..19fe432 100644
--- a/Marshal_Import.c
+++ b/Marshal_Import.c
@@ -62,6 +62,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_IncrementalSelfTest.c b/Marshal_IncrementalSelfTest.c
index e2b3eb1..89cba4d 100644
--- a/Marshal_IncrementalSelfTest.c
+++ b/Marshal_IncrementalSelfTest.c
@@ -44,6 +44,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Load.c b/Marshal_Load.c
index 04c3e53..8a7f602 100644
--- a/Marshal_Load.c
+++ b/Marshal_Load.c
@@ -52,6 +52,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_LoadExternal.c b/Marshal_LoadExternal.c
index eef0387..8852f27 100644
--- a/Marshal_LoadExternal.c
+++ b/Marshal_LoadExternal.c
@@ -54,6 +54,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_MakeCredential.c b/Marshal_MakeCredential.c
index c5ae671..af8bf51 100644
--- a/Marshal_MakeCredential.c
+++ b/Marshal_MakeCredential.c
@@ -51,6 +51,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_Certify.c b/Marshal_NV_Certify.c
index f29b1f5..286901e 100644
--- a/Marshal_NV_Certify.c
+++ b/Marshal_NV_Certify.c
@@ -61,6 +61,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_ChangeAuth.c b/Marshal_NV_ChangeAuth.c
index f937e7d..baf8ddd 100644
--- a/Marshal_NV_ChangeAuth.c
+++ b/Marshal_NV_ChangeAuth.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_DefineSpace.c b/Marshal_NV_DefineSpace.c
index c8ac78d..eb7bb03 100644
--- a/Marshal_NV_DefineSpace.c
+++ b/Marshal_NV_DefineSpace.c
@@ -23,6 +23,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_Extend.c b/Marshal_NV_Extend.c
index 9947b2c..0ea984d 100644
--- a/Marshal_NV_Extend.c
+++ b/Marshal_NV_Extend.c
@@ -20,6 +20,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_GlobalWriteLock.c b/Marshal_NV_GlobalWriteLock.c
index ac235a8..4fc63b3 100644
--- a/Marshal_NV_GlobalWriteLock.c
+++ b/Marshal_NV_GlobalWriteLock.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_Increment.c b/Marshal_NV_Increment.c
index 6b91d29..97a8359 100644
--- a/Marshal_NV_Increment.c
+++ b/Marshal_NV_Increment.c
@@ -15,6 +15,9 @@
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
target->nvIndex = request_handles[1];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_Read.c b/Marshal_NV_Read.c
index fd11a53..4eea9fd 100644
--- a/Marshal_NV_Read.c
+++ b/Marshal_NV_Read.c
@@ -51,6 +51,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_ReadLock.c b/Marshal_NV_ReadLock.c
index 4bef000..4ff4f38 100644
--- a/Marshal_NV_ReadLock.c
+++ b/Marshal_NV_ReadLock.c
@@ -15,6 +15,9 @@
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
target->nvIndex = request_handles[1];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
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 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;
}
diff --git a/Marshal_NV_SetBits.c b/Marshal_NV_SetBits.c
index ed24cb6..c57ad5f 100644
--- a/Marshal_NV_SetBits.c
+++ b/Marshal_NV_SetBits.c
@@ -20,6 +20,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_UndefineSpace.c b/Marshal_NV_UndefineSpace.c
index 3aadca2..f734cb7 100644
--- a/Marshal_NV_UndefineSpace.c
+++ b/Marshal_NV_UndefineSpace.c
@@ -15,6 +15,9 @@
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
target->nvIndex = request_handles[1];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_UndefineSpaceSpecial.c b/Marshal_NV_UndefineSpaceSpecial.c
index 059a697..959ab10 100644
--- a/Marshal_NV_UndefineSpaceSpecial.c
+++ b/Marshal_NV_UndefineSpaceSpecial.c
@@ -15,6 +15,9 @@
// Get request handles from request_handles array.
target->nvIndex = request_handles[0];
target->platform = request_handles[1];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_Write.c b/Marshal_NV_Write.c
index 552181b..4e26581 100644
--- a/Marshal_NV_Write.c
+++ b/Marshal_NV_Write.c
@@ -24,6 +24,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_NV_WriteLock.c b/Marshal_NV_WriteLock.c
index bec0e1b..a72f81b 100644
--- a/Marshal_NV_WriteLock.c
+++ b/Marshal_NV_WriteLock.c
@@ -15,6 +15,9 @@
// Get request handles from request_handles array.
target->authHandle = request_handles[0];
target->nvIndex = request_handles[1];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ObjectChangeAuth.c b/Marshal_ObjectChangeAuth.c
index 6d9ac30..48de793 100644
--- a/Marshal_ObjectChangeAuth.c
+++ b/Marshal_ObjectChangeAuth.c
@@ -47,6 +47,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_Allocate.c b/Marshal_PCR_Allocate.c
index e42b352..0d9cd24 100644
--- a/Marshal_PCR_Allocate.c
+++ b/Marshal_PCR_Allocate.c
@@ -49,6 +49,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_Event.c b/Marshal_PCR_Event.c
index c37bd4c..9a4c094 100644
--- a/Marshal_PCR_Event.c
+++ b/Marshal_PCR_Event.c
@@ -46,6 +46,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_Extend.c b/Marshal_PCR_Extend.c
index 5adf539..e13f6f0 100644
--- a/Marshal_PCR_Extend.c
+++ b/Marshal_PCR_Extend.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_Read.c b/Marshal_PCR_Read.c
index 40ec293..e599bb7 100644
--- a/Marshal_PCR_Read.c
+++ b/Marshal_PCR_Read.c
@@ -47,6 +47,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_Reset.c b/Marshal_PCR_Reset.c
index 73e23b6..3f03af5 100644
--- a/Marshal_PCR_Reset.c
+++ b/Marshal_PCR_Reset.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->pcrHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_SetAuthPolicy.c b/Marshal_PCR_SetAuthPolicy.c
index 0e2f7dd..03bd3f6 100644
--- a/Marshal_PCR_SetAuthPolicy.c
+++ b/Marshal_PCR_SetAuthPolicy.c
@@ -24,6 +24,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PCR_SetAuthValue.c b/Marshal_PCR_SetAuthValue.c
index b1d95ee..26d5a0d 100644
--- a/Marshal_PCR_SetAuthValue.c
+++ b/Marshal_PCR_SetAuthValue.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PP_Commands.c b/Marshal_PP_Commands.c
index 56994c5..a01a9f8 100644
--- a/Marshal_PP_Commands.c
+++ b/Marshal_PP_Commands.c
@@ -23,6 +23,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyAuthValue.c b/Marshal_PolicyAuthValue.c
index cc99c44..e5920cf 100644
--- a/Marshal_PolicyAuthValue.c
+++ b/Marshal_PolicyAuthValue.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->policySession = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyAuthorize.c b/Marshal_PolicyAuthorize.c
index c153fe1..3a62df5 100644
--- a/Marshal_PolicyAuthorize.c
+++ b/Marshal_PolicyAuthorize.c
@@ -31,6 +31,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyCommandCode.c b/Marshal_PolicyCommandCode.c
index 4a83649..022a200 100644
--- a/Marshal_PolicyCommandCode.c
+++ b/Marshal_PolicyCommandCode.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyCounterTimer.c b/Marshal_PolicyCounterTimer.c
index 09488a3..d0c12bb 100644
--- a/Marshal_PolicyCounterTimer.c
+++ b/Marshal_PolicyCounterTimer.c
@@ -27,6 +27,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyCpHash.c b/Marshal_PolicyCpHash.c
index ed238bb..4eced2e 100644
--- a/Marshal_PolicyCpHash.c
+++ b/Marshal_PolicyCpHash.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyDuplicationSelect.c b/Marshal_PolicyDuplicationSelect.c
index c3a4b61..e492833 100644
--- a/Marshal_PolicyDuplicationSelect.c
+++ b/Marshal_PolicyDuplicationSelect.c
@@ -27,6 +27,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyGetDigest.c b/Marshal_PolicyGetDigest.c
index 5bc768f..219ee7c 100644
--- a/Marshal_PolicyGetDigest.c
+++ b/Marshal_PolicyGetDigest.c
@@ -41,6 +41,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->policySession = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyLocality.c b/Marshal_PolicyLocality.c
index 200b2b0..1ddb836 100644
--- a/Marshal_PolicyLocality.c
+++ b/Marshal_PolicyLocality.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyNV.c b/Marshal_PolicyNV.c
index ceec3bb..d4e7c5d 100644
--- a/Marshal_PolicyNV.c
+++ b/Marshal_PolicyNV.c
@@ -29,6 +29,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyNameHash.c b/Marshal_PolicyNameHash.c
index e6b477c..00f1755 100644
--- a/Marshal_PolicyNameHash.c
+++ b/Marshal_PolicyNameHash.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyNvWritten.c b/Marshal_PolicyNvWritten.c
index 99ddf38..2052451 100644
--- a/Marshal_PolicyNvWritten.c
+++ b/Marshal_PolicyNvWritten.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyOR.c b/Marshal_PolicyOR.c
index 604df01..ebb669c 100644
--- a/Marshal_PolicyOR.c
+++ b/Marshal_PolicyOR.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyPCR.c b/Marshal_PolicyPCR.c
index e4b2f06..3d92a8b 100644
--- a/Marshal_PolicyPCR.c
+++ b/Marshal_PolicyPCR.c
@@ -23,6 +23,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyPassword.c b/Marshal_PolicyPassword.c
index 838352a..f82d64f 100644
--- a/Marshal_PolicyPassword.c
+++ b/Marshal_PolicyPassword.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->policySession = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyPhysicalPresence.c b/Marshal_PolicyPhysicalPresence.c
index e8472e2..f3644cc 100644
--- a/Marshal_PolicyPhysicalPresence.c
+++ b/Marshal_PolicyPhysicalPresence.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->policySession = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyRestart.c b/Marshal_PolicyRestart.c
index 9211208..b93a45c 100644
--- a/Marshal_PolicyRestart.c
+++ b/Marshal_PolicyRestart.c
@@ -14,6 +14,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->sessionHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicySecret.c b/Marshal_PolicySecret.c
index 696f16a..6b4c415 100644
--- a/Marshal_PolicySecret.c
+++ b/Marshal_PolicySecret.c
@@ -60,6 +60,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicySigned.c b/Marshal_PolicySigned.c
index ee37c63..c5068f1 100644
--- a/Marshal_PolicySigned.c
+++ b/Marshal_PolicySigned.c
@@ -64,6 +64,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_PolicyTicket.c b/Marshal_PolicyTicket.c
index cb196a5..df1e87c 100644
--- a/Marshal_PolicyTicket.c
+++ b/Marshal_PolicyTicket.c
@@ -35,6 +35,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Quote.c b/Marshal_Quote.c
index bb0910a..21d9a9e 100644
--- a/Marshal_Quote.c
+++ b/Marshal_Quote.c
@@ -55,6 +55,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_RSA_Decrypt.c b/Marshal_RSA_Decrypt.c
index c4c1bfb..a33d90a 100644
--- a/Marshal_RSA_Decrypt.c
+++ b/Marshal_RSA_Decrypt.c
@@ -54,6 +54,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_RSA_Encrypt.c b/Marshal_RSA_Encrypt.c
index 24a6539..ae3c944 100644
--- a/Marshal_RSA_Encrypt.c
+++ b/Marshal_RSA_Encrypt.c
@@ -54,6 +54,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ReadPublic.c b/Marshal_ReadPublic.c
index ff14f67..5d39c93 100644
--- a/Marshal_ReadPublic.c
+++ b/Marshal_ReadPublic.c
@@ -43,6 +43,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->objectHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Rewrap.c b/Marshal_Rewrap.c
index 236ae89..608f4ce 100644
--- a/Marshal_Rewrap.c
+++ b/Marshal_Rewrap.c
@@ -57,6 +57,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_SelfTest.c b/Marshal_SelfTest.c
index 9013980..f7bdaf7 100644
--- a/Marshal_SelfTest.c
+++ b/Marshal_SelfTest.c
@@ -17,6 +17,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_SequenceComplete.c b/Marshal_SequenceComplete.c
index e9ab8cf..a77a3e7 100644
--- a/Marshal_SequenceComplete.c
+++ b/Marshal_SequenceComplete.c
@@ -51,6 +51,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_SequenceUpdate.c b/Marshal_SequenceUpdate.c
index 0f65e7d..9c5d130 100644
--- a/Marshal_SequenceUpdate.c
+++ b/Marshal_SequenceUpdate.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_SetAlgorithmSet.c b/Marshal_SetAlgorithmSet.c
index 33178c6..3cf57c9 100644
--- a/Marshal_SetAlgorithmSet.c
+++ b/Marshal_SetAlgorithmSet.c
@@ -19,6 +19,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_SetCommandCodeAuditStatus.c b/Marshal_SetCommandCodeAuditStatus.c
index 9129403..17b96e0 100644
--- a/Marshal_SetCommandCodeAuditStatus.c
+++ b/Marshal_SetCommandCodeAuditStatus.c
@@ -28,6 +28,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_SetPrimaryPolicy.c b/Marshal_SetPrimaryPolicy.c
index 7a9a4a0..7e439c4 100644
--- a/Marshal_SetPrimaryPolicy.c
+++ b/Marshal_SetPrimaryPolicy.c
@@ -23,6 +23,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Shutdown.c b/Marshal_Shutdown.c
index c17dab3..6ff1af3 100644
--- a/Marshal_Shutdown.c
+++ b/Marshal_Shutdown.c
@@ -17,6 +17,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Sign.c b/Marshal_Sign.c
index fc6014c..baef51d 100644
--- a/Marshal_Sign.c
+++ b/Marshal_Sign.c
@@ -54,6 +54,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_StartAuthSession.c b/Marshal_StartAuthSession.c
index a7da32b..0f6754c 100644
--- a/Marshal_StartAuthSession.c
+++ b/Marshal_StartAuthSession.c
@@ -67,6 +67,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Startup.c b/Marshal_Startup.c
index 017ff37..2b29888 100644
--- a/Marshal_Startup.c
+++ b/Marshal_Startup.c
@@ -17,6 +17,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_StirRandom.c b/Marshal_StirRandom.c
index 2b3e612..c866829 100644
--- a/Marshal_StirRandom.c
+++ b/Marshal_StirRandom.c
@@ -17,6 +17,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_TestParms.c b/Marshal_TestParms.c
index f5d5338..8d089f9 100644
--- a/Marshal_TestParms.c
+++ b/Marshal_TestParms.c
@@ -17,6 +17,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_Unseal.c b/Marshal_Unseal.c
index 8d12ea1..76b1671 100644
--- a/Marshal_Unseal.c
+++ b/Marshal_Unseal.c
@@ -41,6 +41,9 @@
TPM_RC result = TPM_RC_SUCCESS;
// Get request handles from request_handles array.
target->itemHandle = request_handles[0];
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_VerifySignature.c b/Marshal_VerifySignature.c
index 5a7c116..060c7e6 100644
--- a/Marshal_VerifySignature.c
+++ b/Marshal_VerifySignature.c
@@ -50,6 +50,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}
diff --git a/Marshal_ZGen_2Phase.c b/Marshal_ZGen_2Phase.c
index 339a22c..143e389 100644
--- a/Marshal_ZGen_2Phase.c
+++ b/Marshal_ZGen_2Phase.c
@@ -60,6 +60,9 @@
if (result != TPM_RC_SUCCESS) {
return result;
}
+ if ((result == TPM_RC_SUCCESS) && *size) {
+ result = TPM_RC_SIZE;
+ }
return result;
}