mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-20 11:45:32 +00:00
rev148: Initialize handleCount to 0 in ParseHandleBuffer
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
e86f6c8a4f
commit
8f564b59ec
@ -1,9 +1,9 @@
|
||||
/********************************************************************************/
|
||||
/* */
|
||||
/* */
|
||||
/* Command Dispatcher */
|
||||
/* Written by Ken Goldman */
|
||||
/* IBM Thomas J. Watson Research Center */
|
||||
/* $Id: CommandDispatcher.c 828 2016-11-18 21:19:43Z kgoldman $ */
|
||||
/* $Id: CommandDispatcher.c 1259 2018-07-10 19:11:09Z kgoldman $ */
|
||||
/* */
|
||||
/* Licenses and Notices */
|
||||
/* */
|
||||
@ -55,7 +55,7 @@
|
||||
/* arising in any way out of use or reliance upon this specification or any */
|
||||
/* information herein. */
|
||||
/* */
|
||||
/* (c) Copyright IBM Corp. and others, 2016 */
|
||||
/* (c) Copyright IBM Corp. and others, 2016 - 2018 */
|
||||
/* */
|
||||
/********************************************************************************/
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
/* NOTE 2 The reference implementation is permitted to do compare operations over a union as a byte
|
||||
array. Therefore, the command parameter in structure must be initialized (e.g., zeroed) before
|
||||
unmarshaling so that the compare operation is valid in cases where some bytes are unused. */
|
||||
/* 6.3.1.1 Includes */
|
||||
/* 6.3.1.1 Includes, Types, and Structures */
|
||||
#include "Tpm.h"
|
||||
#ifdef TABLE_DRIVEN_DISPATCH //%
|
||||
typedef TPM_RC(NoFlagFunction)(void *target, BYTE **buffer, INT32 *size);
|
||||
@ -113,8 +113,7 @@ typedef struct
|
||||
#else
|
||||
#include "Commands.h"
|
||||
#endif
|
||||
/* 6.3.1.2 Marshal/Unmarshal Functions */
|
||||
/* 6.3.1.2.1 ParseHandleBuffer() */
|
||||
/* 6.3.3 ParseHandleBuffer() */
|
||||
/* This is the table-driven version of the handle buffer unmarshaling code */
|
||||
TPM_RC
|
||||
ParseHandleBuffer(
|
||||
@ -180,6 +179,7 @@ ParseHandleBuffer(
|
||||
INT32 *bufferRemainingSize = &command->parameterSize;
|
||||
TPM_HANDLE *handles = &command->handles[0];
|
||||
UINT32 *handleCount = &command->handleNum;
|
||||
*handleCount = 0;
|
||||
switch(command->code)
|
||||
{
|
||||
#include "HandleProcess.h"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user