From a811c35fcaa26d36c8deeca3a038abe7800dfca4 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Mon, 23 Sep 2024 16:33:28 -0400 Subject: [PATCH] tpm2: Rename buffer to objbuf to avoid shadowing buffer variable Signed-off-by: Stefan Berger --- src/tpm2/ContextCommands.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tpm2/ContextCommands.c b/src/tpm2/ContextCommands.c index dae73fa3..70f9e9d9 100644 --- a/src/tpm2/ContextCommands.c +++ b/src/tpm2/ContextCommands.c @@ -126,9 +126,9 @@ TPM2_ContextSave(ContextSave_In* in, // IN: input parameter list { OBJECT* object = HandleToObject(in->saveHandle); ANY_OBJECT_BUFFER* outObject; - unsigned char buffer[sizeof(OBJECT) * 2]; // libtpms changed begin - BYTE* bufptr = &buffer[0]; - INT32 size = sizeof(buffer); + unsigned char objbuf[sizeof(OBJECT) * 2]; // libtpms changed begin + BYTE* bufptr = &objbuf[0]; + INT32 size = sizeof(objbuf); UINT16 objectSize; // libtpms changed end outObject = (ANY_OBJECT_BUFFER*)(out->context.contextBlob.t.buffer + integritySize + fingerprintSize); @@ -154,7 +154,7 @@ TPM2_ContextSave(ContextSave_In* in, // IN: input parameter list pAssert(out->context.contextBlob.t.size <= sizeof(out->context.contextBlob.t.buffer)); // Copy the whole internal OBJECT structure to context blob - MemoryCopy(outObject, buffer, objectSize); // libtpms changed + MemoryCopy(outObject, objbuf, objectSize); // libtpms changed // Increment object context ID gr.objectContextID++; // If object context ID overflows, TPM should be put in failure mode