Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/tss2-1045/tpmutils/tss/stdafx.h
Examining data/tss2-1045/tpmutils/tss/targetver.h
Examining data/tss2-1045/tpmutils/tss/dllmain.cpp
Examining data/tss2-1045/tpmutils/tss/stdafx.cpp
Examining data/tss2-1045/utils/getcapability.c
Examining data/tss2-1045/utils/contextload.c
Examining data/tss2-1045/utils/tsstransmit.c
Examining data/tss2-1045/utils/eventlib.h
Examining data/tss2-1045/utils/tss2/PolicyTicket_fp.h
Examining data/tss2-1045/utils/tss2/PCR_Extend_fp.h
Examining data/tss2-1045/utils/tss2/Import_fp.h
Examining data/tss2-1045/utils/tss2/Implementation.h
Examining data/tss2-1045/utils/tss2/HMAC_fp.h
Examining data/tss2-1045/utils/tss2/ClearControl_fp.h
Examining data/tss2-1045/utils/tss2/NV_SetBits_fp.h
Examining data/tss2-1045/utils/tss2/LoadExternal_fp.h
Examining data/tss2-1045/utils/tss2/tsstransmit.h
Examining data/tss2-1045/utils/tss2/SelfTest_fp.h
Examining data/tss2-1045/utils/tss2/CreatePrimary_fp.h
Examining data/tss2-1045/utils/tss2/PolicyDuplicationSelect_fp.h
Examining data/tss2-1045/utils/tss2/tssutils.h
Examining data/tss2-1045/utils/tss2/Clear_fp.h
Examining data/tss2-1045/utils/tss2/ActivateCredential_fp.h
Examining data/tss2-1045/utils/tss2/SetAlgorithmSet_fp.h
Examining data/tss2-1045/utils/tss2/Shutdown_fp.h
Examining data/tss2-1045/utils/tss2/DictionaryAttackParameters_fp.h
Examining data/tss2-1045/utils/tss2/EncryptDecrypt_fp.h
Examining data/tss2-1045/utils/tss2/PolicyCpHash_fp.h
Examining data/tss2-1045/utils/tss2/Unseal_fp.h
Examining data/tss2-1045/utils/tss2/HierarchyChangeAuth_fp.h
Examining data/tss2-1045/utils/tss2/PolicySigned_fp.h
Examining data/tss2-1045/utils/tss2/ChangePPS_fp.h
Examining data/tss2-1045/utils/tss2/ObjectChangeAuth_fp.h
Examining data/tss2-1045/utils/tss2/Rewrap_fp.h
Examining data/tss2-1045/utils/tss2/SetCommandCodeAuditStatus_fp.h
Examining data/tss2-1045/utils/tss2/RSA_Encrypt_fp.h
Examining data/tss2-1045/utils/tss2/TPMB.h
Examining data/tss2-1045/utils/tss2/PolicyAuthorize_fp.h
Examining data/tss2-1045/utils/tss2/StartAuthSession_fp.h
Examining data/tss2-1045/utils/tss2/CertifyCreation_fp.h
Examining data/tss2-1045/utils/tss2/CreateLoaded_fp.h
Examining data/tss2-1045/utils/tss2/tssresponsecode.h
Examining data/tss2-1045/utils/tss2/PolicyPCR_fp.h
Examining data/tss2-1045/utils/tss2/HierarchyControl_fp.h
Examining data/tss2-1045/utils/tss2/Load_fp.h
Examining data/tss2-1045/utils/tss2/ChangeEPS_fp.h
Examining data/tss2-1045/utils/tss2/EC_Ephemeral_fp.h
Examining data/tss2-1045/utils/tss2/PolicyTemplate_fp.h
Examining data/tss2-1045/utils/tss2/NV_UndefineSpaceSpecial_fp.h
Examining data/tss2-1045/utils/tss2/StirRandom_fp.h
Examining data/tss2-1045/utils/tss2/PolicyPassword_fp.h
Examining data/tss2-1045/utils/tss2/ReadClock_fp.h
Examining data/tss2-1045/utils/tss2/Startup_fp.h
Examining data/tss2-1045/utils/tss2/PolicyAuthValue_fp.h
Examining data/tss2-1045/utils/tss2/BaseTypes.h
Examining data/tss2-1045/utils/tss2/PolicyRestart_fp.h
Examining data/tss2-1045/utils/tss2/Hash_fp.h
Examining data/tss2-1045/utils/tss2/HashSequenceStart_fp.h
Examining data/tss2-1045/utils/tss2/Sign_fp.h
Examining data/tss2-1045/utils/tss2/ReadPublic_fp.h
Examining data/tss2-1045/utils/tss2/ECDH_ZGen_fp.h
Examining data/tss2-1045/utils/tss2/PolicyNameHash_fp.h
Examining data/tss2-1045/utils/tss2/NV_Write_fp.h
Examining data/tss2-1045/utils/tss2/GetRandom_fp.h
Examining data/tss2-1045/utils/tss2/GetCommandAuditDigest_fp.h
Examining data/tss2-1045/utils/tss2/TestParms_fp.h
Examining data/tss2-1045/utils/tss2/tsserror.h
Examining data/tss2-1045/utils/tss2/PolicyNvWritten_fp.h
Examining data/tss2-1045/utils/tss2/SequenceUpdate_fp.h
Examining data/tss2-1045/utils/tss2/Quote_fp.h
Examining data/tss2-1045/utils/tss2/ContextSave_fp.h
Examining data/tss2-1045/utils/tss2/ECC_Parameters_fp.h
Examining data/tss2-1045/utils/tss2/PCR_SetAuthPolicy_fp.h
Examining data/tss2-1045/utils/tss2/IncrementalSelfTest_fp.h
Examining data/tss2-1045/utils/tss2/tss.h
Examining data/tss2-1045/utils/tss2/ClockSet_fp.h
Examining data/tss2-1045/utils/tss2/Commit_fp.h
Examining data/tss2-1045/utils/tss2/tsscrypto.h
Examining data/tss2-1045/utils/tss2/NV_Extend_fp.h
Examining data/tss2-1045/utils/tss2/NV_Increment_fp.h
Examining data/tss2-1045/utils/tss2/PCR_SetAuthValue_fp.h
Examining data/tss2-1045/utils/tss2/NV_GlobalWriteLock_fp.h
Examining data/tss2-1045/utils/tss2/EvictControl_fp.h
Examining data/tss2-1045/utils/tss2/PolicyLocality_fp.h
Examining data/tss2-1045/utils/tss2/Create_fp.h
Examining data/tss2-1045/utils/tss2/EventSequenceComplete_fp.h
Examining data/tss2-1045/utils/tss2/EncryptDecrypt2_fp.h
Examining data/tss2-1045/utils/tss2/NV_DefineSpace_fp.h
Examining data/tss2-1045/utils/tss2/PCR_Reset_fp.h
Examining data/tss2-1045/utils/tss2/NV_Read_fp.h
Examining data/tss2-1045/utils/tss2/PolicyGetDigest_fp.h
Examining data/tss2-1045/utils/tss2/TPM_Types.h
Examining data/tss2-1045/utils/tss2/ECDH_KeyGen_fp.h
Examining data/tss2-1045/utils/tss2/PolicySecret_fp.h
Examining data/tss2-1045/utils/tss2/FlushContext_fp.h
Examining data/tss2-1045/utils/tss2/NV_UndefineSpace_fp.h
Examining data/tss2-1045/utils/tss2/PCR_Read_fp.h
Examining data/tss2-1045/utils/tss2/GetTime_fp.h
Examining data/tss2-1045/utils/tss2/PolicyNV_fp.h
Examining data/tss2-1045/utils/tss2/NV_Certify_fp.h
Examining data/tss2-1045/utils/tss2/NV_ReadPublic_fp.h
Examining data/tss2-1045/utils/tss2/VerifySignature_fp.h
Examining data/tss2-1045/utils/tss2/PolicyAuthorizeNV_fp.h
Examining data/tss2-1045/utils/tss2/Certify_fp.h
Examining data/tss2-1045/utils/tss2/RSA_Decrypt_fp.h
Examining data/tss2-1045/utils/tss2/MakeCredential_fp.h
Examining data/tss2-1045/utils/tss2/Duplicate_fp.h
Examining data/tss2-1045/utils/tss2/PCR_Event_fp.h
Examining data/tss2-1045/utils/tss2/PolicyPhysicalPresence_fp.h
Examining data/tss2-1045/utils/tss2/PolicyCommandCode_fp.h
Examining data/tss2-1045/utils/tss2/tssprint.h
Examining data/tss2-1045/utils/tss2/GetTestResult_fp.h
Examining data/tss2-1045/utils/tss2/SetPrimaryPolicy_fp.h
Examining data/tss2-1045/utils/tss2/NV_WriteLock_fp.h
Examining data/tss2-1045/utils/tss2/TpmBuildSwitches.h
Examining data/tss2-1045/utils/tss2/NV_ChangeAuth_fp.h
Examining data/tss2-1045/utils/tss2/PolicyCounterTimer_fp.h
Examining data/tss2-1045/utils/tss2/PolicyOR_fp.h
Examining data/tss2-1045/utils/tss2/tsscryptoh.h
Examining data/tss2-1045/utils/tss2/Parameters.h
Examining data/tss2-1045/utils/tss2/ZGen_2Phase_fp.h
Examining data/tss2-1045/utils/tss2/HMAC_Start_fp.h
Examining data/tss2-1045/utils/tss2/PP_Commands_fp.h
Examining data/tss2-1045/utils/tss2/ClockRateAdjust_fp.h
Examining data/tss2-1045/utils/tss2/DictionaryAttackLockReset_fp.h
Examining data/tss2-1045/utils/tss2/GetCapability_fp.h
Examining data/tss2-1045/utils/tss2/GetSessionAuditDigest_fp.h
Examining data/tss2-1045/utils/tss2/Unmarshal_fp.h
Examining data/tss2-1045/utils/tss2/PCR_Allocate_fp.h
Examining data/tss2-1045/utils/tss2/NV_ReadLock_fp.h
Examining data/tss2-1045/utils/tss2/SequenceComplete_fp.h
Examining data/tss2-1045/utils/tss2/tssfile.h
Examining data/tss2-1045/utils/tss2/ContextLoad_fp.h
Examining data/tss2-1045/utils/tss2/tssmarshal.h
Examining data/tss2-1045/utils/policyauthvalue.c
Examining data/tss2-1045/utils/clearcontrol.c
Examining data/tss2-1045/utils/readclock.c
Examining data/tss2-1045/utils/tssntc.c
Examining data/tss2-1045/utils/quote.c
Examining data/tss2-1045/utils/nvextend.c
Examining data/tss2-1045/utils/sequencecomplete.c
Examining data/tss2-1045/utils/signapp.c
Examining data/tss2-1045/utils/tsstbsi.h
Examining data/tss2-1045/utils/objecttemplates.c
Examining data/tss2-1045/utils/policysecret.c
Examining data/tss2-1045/utils/policypcr.c
Examining data/tss2-1045/utils/eccparameters.c
Examining data/tss2-1045/utils/nvcertify.c
Examining data/tss2-1045/utils/import.c
Examining data/tss2-1045/utils/Platform.h
Examining data/tss2-1045/utils/load.c
Examining data/tss2-1045/utils/tssproperties.c
Examining data/tss2-1045/utils/clockset.c
Examining data/tss2-1045/utils/tssfile.c
Examining data/tss2-1045/utils/gettime.c
Examining data/tss2-1045/utils/tsstbsi.c
Examining data/tss2-1045/utils/getrandom.c
Examining data/tss2-1045/utils/tssproperties.h
Examining data/tss2-1045/utils/verifysignature.c
Examining data/tss2-1045/utils/tbs.h
Examining data/tss2-1045/utils/hmacstart.c
Examining data/tss2-1045/utils/nvread.c
Examining data/tss2-1045/utils/policycountertimer.c
Examining data/tss2-1045/utils/cryptoutils.h
Examining data/tss2-1045/utils/contextsave.c
Examining data/tss2-1045/utils/tsscryptoh.c
Examining data/tss2-1045/utils/nvincrement.c
Examining data/tss2-1045/utils/hmac.c
Examining data/tss2-1045/utils/TpmError.h
Examining data/tss2-1045/utils/ntc2preconfig.c
Examining data/tss2-1045/utils/sign.c
Examining data/tss2-1045/utils/tssccattributes.c
Examining data/tss2-1045/utils/hierarchycontrol.c
Examining data/tss2-1045/utils/tssdev.h
Examining data/tss2-1045/utils/CommandAttributeData.c
Examining data/tss2-1045/utils/create.c
Examining data/tss2-1045/utils/fail.h
Examining data/tss2-1045/utils/loadexternal.c
Examining data/tss2-1045/utils/Unmarshal.c
Examining data/tss2-1045/utils/pcrallocate.c
Examining data/tss2-1045/utils/duplicate.c
Examining data/tss2-1045/utils/pcrread.c
Examining data/tss2-1045/utils/policymaker.c
Examining data/tss2-1045/utils/tssccattributes.h
Examining data/tss2-1045/utils/timepacket.c
Examining data/tss2-1045/utils/policymakerpcr.c
Examining data/tss2-1045/utils/tsssocket.h
Examining data/tss2-1045/utils/nvwrite.c
Examining data/tss2-1045/utils/dictionaryattackparameters.c
Examining data/tss2-1045/utils/activatecredential.c
Examining data/tss2-1045/utils/swap.h
Examining data/tss2-1045/utils/makecredential.c
Examining data/tss2-1045/utils/nvundefinespace.c
Examining data/tss2-1045/utils/readpublic.c
Examining data/tss2-1045/utils/writeapp.c
Examining data/tss2-1045/utils/nvreadpublic.c
Examining data/tss2-1045/utils/returncode.c
Examining data/tss2-1045/utils/tssresponsecode.c
Examining data/tss2-1045/utils/nvdefinespace.c
Examining data/tss2-1045/utils/tsscrypto.c
Examining data/tss2-1045/utils/getcommandauditdigest.c
Examining data/tss2-1045/utils/policypassword.c
Examining data/tss2-1045/utils/rewrap.c
Examining data/tss2-1045/utils/pcrevent.c
Examining data/tss2-1045/utils/tssutils.c
Examining data/tss2-1045/utils/fail.c
Examining data/tss2-1045/utils/setprimarypolicy.c
Examining data/tss2-1045/utils/tsssocket.c
Examining data/tss2-1045/utils/nvundefinespacespecial.c
Examining data/tss2-1045/utils/policyor.c
Examining data/tss2-1045/utils/ekutils.h
Examining data/tss2-1045/utils/eventsequencecomplete.c
Examining data/tss2-1045/utils/policyticket.c
Examining data/tss2-1045/utils/sequenceupdate.c
Examining data/tss2-1045/utils/ntc2lib.h
Examining data/tss2-1045/utils/pcrreset.c
Examining data/tss2-1045/utils/tss.c
Examining data/tss2-1045/utils/policycphash.c
Examining data/tss2-1045/utils/changepps.c
Examining data/tss2-1045/utils/nvglobalwritelock.c
Examining data/tss2-1045/utils/tssmarshal.c
Examining data/tss2-1045/utils/dictionaryattacklockreset.c
Examining data/tss2-1045/utils/certify.c
Examining data/tss2-1045/utils/policysigned.c
Examining data/tss2-1045/utils/cryptoutils.c
Examining data/tss2-1045/utils/policytemplate.c
Examining data/tss2-1045/utils/imalib.c
Examining data/tss2-1045/utils/ntc2getconfig.c
Examining data/tss2-1045/utils/certifycreation.c
Examining data/tss2-1045/utils/tssauth.h
Examining data/tss2-1045/utils/policyauthorize.c
Examining data/tss2-1045/utils/policycommandcode.c
Examining data/tss2-1045/utils/CommandAttributes.h
Examining data/tss2-1045/utils/policygetdigest.c
Examining data/tss2-1045/utils/ecephemeral.c
Examining data/tss2-1045/utils/nvreadlock.c
Examining data/tss2-1045/utils/stirrandom.c
Examining data/tss2-1045/utils/shutdown.c
Examining data/tss2-1045/utils/createek.c
Examining data/tss2-1045/utils/tssdev.c
Examining data/tss2-1045/utils/hash.c
Examining data/tss2-1045/utils/policyauthorizenv.c
Examining data/tss2-1045/utils/Commands.c
Examining data/tss2-1045/utils/hierarchychangeauth.c
Examining data/tss2-1045/utils/evictcontrol.c
Examining data/tss2-1045/utils/ntc2lib.c
Examining data/tss2-1045/utils/nvwritelock.c
Examining data/tss2-1045/utils/changeeps.c
Examining data/tss2-1045/utils/applink.c
Examining data/tss2-1045/utils/ntc2lockconfig.c
Examining data/tss2-1045/utils/unseal.c
Examining data/tss2-1045/utils/commit.c
Examining data/tss2-1045/utils/Commands_fp.h
Examining data/tss2-1045/utils/policynv.c
Examining data/tss2-1045/utils/powerup.c
Examining data/tss2-1045/utils/rsadecrypt.c
Examining data/tss2-1045/utils/getsessionauditdigest.c
Examining data/tss2-1045/utils/nvsetbits.c
Examining data/tss2-1045/utils/clear.c
Examining data/tss2-1045/utils/eventextend.c
Examining data/tss2-1045/utils/clockrateadjust.c
Examining data/tss2-1045/utils/pcrextend.c
Examining data/tss2-1045/utils/flushcontext.c
Examining data/tss2-1045/utils/policynvwritten.c
Examining data/tss2-1045/utils/tssntc.h
Examining data/tss2-1045/utils/imaextend.c
Examining data/tss2-1045/utils/startauthsession.c
Examining data/tss2-1045/utils/eventlib.c
Examining data/tss2-1045/utils/tssauth.c
Examining data/tss2-1045/utils/objectchangeauth.c
Examining data/tss2-1045/utils/objecttemplates.h
Examining data/tss2-1045/utils/rsaencrypt.c
Examining data/tss2-1045/utils/createloaded.c
Examining data/tss2-1045/utils/tssprint.c
Examining data/tss2-1045/utils/encryptdecrypt.c
Examining data/tss2-1045/utils/importpem.c
Examining data/tss2-1045/utils/policyrestart.c
Examining data/tss2-1045/utils/createprimary.c
Examining data/tss2-1045/utils/startup.c
Examining data/tss2-1045/utils/hashsequencestart.c
Examining data/tss2-1045/utils/nvchangeauth.c
Examining data/tss2-1045/utils/imalib.h
Examining data/tss2-1045/utils/ekutils.c

FINAL RESULTS:

data/tss2-1045/utils/applink.c:63:42:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	OPENSSL_ApplinkTable[APPLINK_FPRINTF]	= fprintf;
data/tss2-1045/utils/clockset.c:105:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		sscanf(argv[i],"%"SCNu64, &newTime);
data/tss2-1045/utils/tss.c:1206:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sessionFilename, "%s/h%08x.bin",
data/tss2-1045/utils/tss.c:1253:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sessionFilename, "%s/h%08x.bin", tssContext->tssDataDirectory, sessionHandle);
data/tss2-1045/utils/tss.c:1608:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nameFilename, "%s/h%08x.bin", tssContext->tssDataDirectory, handle);
data/tss2-1045/utils/tss.c:1617:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nameFilename, "%s/h%s.bin", tssContext->tssDataDirectory, string);
data/tss2-1045/utils/tss.c:1654:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nameFilename, "%s/h%08x.bin", tssContext->tssDataDirectory, handle);
data/tss2-1045/utils/tss.c:1663:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nameFilename, "%s/h%s.bin", tssContext->tssDataDirectory, string);
data/tss2-1045/utils/tss.c:1860:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(publicFilename, "%s/hp%08x.bin", tssContext->tssDataDirectory, handle);
data/tss2-1045/utils/tss.c:1869:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(publicFilename, "%s/hp%s.bin", tssContext->tssDataDirectory, string);
data/tss2-1045/utils/tss.c:1908:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(publicFilename, "%s/hp%08x.bin", tssContext->tssDataDirectory, handle);
data/tss2-1045/utils/tss.c:1917:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(publicFilename, "%s/hp%s.bin", tssContext->tssDataDirectory, string);
data/tss2-1045/utils/tss.c:2124:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(filename, "%s/h%08x.bin", tssContext->tssDataDirectory, handle);
data/tss2-1045/utils/tss.c:2132:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(filename, "%s/hp%08x.bin", tssContext->tssDataDirectory, handle);
data/tss2-1045/utils/tss.c:2220:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(nvpFilename, "%s/nvp%08x.bin", tssContext->tssDataDirectory, nvIndex);
data/tss2-1045/utils/tss.c:2246:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(nvpFilename, "%s/nvp%08x.bin", tssContext->tssDataDirectory, nvIndex);
data/tss2-1045/utils/tss.c:2266:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(nvpFilename, "%s/nvp%08x.bin", tssContext->tssDataDirectory, nvIndex);
data/tss2-1045/utils/tss2/tssprint.h:68:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define printf tssSwallowRc = 0 && TSS_SwallowPrintf
data/tss2-1045/utils/tsscrypto.c:1106:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	envKeyString = getenv("TPM_SESSION_ENCKEY");
data/tss2-1045/utils/tssproperties.c:131:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_TRACE_LEVEL");
data/tss2-1045/utils/tssproperties.c:188:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_DATA_DIR");
data/tss2-1045/utils/tssproperties.c:193:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_ENCRYPT_SESSIONS");
data/tss2-1045/utils/tssproperties.c:198:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_COMMAND_PORT");
data/tss2-1045/utils/tssproperties.c:203:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_PLATFORM_PORT");
data/tss2-1045/utils/tssproperties.c:208:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_SERVER_NAME");
data/tss2-1045/utils/tssproperties.c:213:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_SERVER_TYPE");
data/tss2-1045/utils/tssproperties.c:218:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_INTERFACE_TYPE");
data/tss2-1045/utils/tssproperties.c:223:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	value = getenv("TPM_DEVICE");
data/tss2-1045/utils/Unmarshal.c:126:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(targetBuffer, *buffer, targetSize);
data/tss2-1045/utils/applink.c:71:40:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	OPENSSL_ApplinkTable[APPLINK_FOPEN]	= fopen;
data/tss2-1045/utils/certifycreation.c:352:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(in.creationHash.t.buffer, buffer, length);
data/tss2-1045/utils/clearcontrol.c:100:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		state = atoi(argv[i]);
data/tss2-1045/utils/createek.c:107:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char			*rootFilename[MAX_ROOTS];
data/tss2-1045/utils/cryptoutils.c:322:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tSensitive.sensitive.ecc.t.buffer, privateKeyBin, privateKeyBytes);
data/tss2-1045/utils/cryptoutils.c:396:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tSensitive.sensitive.rsa.t.buffer, privateKeyBin, privateKeyBytes);
data/tss2-1045/utils/cryptoutils.c:475:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(objectPublic->publicArea.unique.ecc.x.t.buffer, modulusBin +1, 32);	
data/tss2-1045/utils/cryptoutils.c:478:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(objectPublic->publicArea.unique.ecc.y.t.buffer, modulusBin +33, 32);	
data/tss2-1045/utils/cryptoutils.c:528:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(objectPublic->publicArea.unique.rsa.t.buffer, modulusBin, modulusBytes);
data/tss2-1045/utils/cryptoutils.c:982:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char earr[3] = {0x01, 0x00, 0x01};
data/tss2-1045/utils/cryptoutils.c:1094:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	pemFile = fopen(pemFilename, "wb");
data/tss2-1045/utils/cryptoutils.c:1313:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&tSignature->signature.rsassa.sig.t.buffer, signatureBin, signatureBinLen);
data/tss2-1045/utils/dictionaryattackparameters.c:92:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		newMaxTries = atoi(argv[i]);
data/tss2-1045/utils/dictionaryattackparameters.c:102:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		newRecoveryTime = atoi(argv[i]);
data/tss2-1045/utils/dictionaryattackparameters.c:112:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		lockoutRecovery = atoi(argv[i]);
data/tss2-1045/utils/ekutils.c:246:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(*readBuffer + bytesRead, out.data.b.buffer, out.data.b.size);
data/tss2-1045/utils/ekutils.c:302:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&tpmtPublic->authPolicy.t.buffer, iwgPolicy, 32);
data/tss2-1045/utils/ekutils.c:328:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(tpmtPublic->authPolicy.t.buffer, iwgPolicy, sizeof(iwgPolicy));
data/tss2-1045/utils/ekutils.c:396:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(derCertificateFileName, "rb");
data/tss2-1045/utils/ekutils.c:480:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	listFile = fopen(listFilename, "rb");		/* closed @1 */
data/tss2-1045/utils/ekutils.c:557:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	caCertFile = fopen(rootFilename[i], "rb");	/* closed @1 */
data/tss2-1045/utils/ekutils.c:1070:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(inCreatePrimary.inPublic.publicArea.unique.rsa.t.buffer, nonce, nonceSize);
data/tss2-1045/utils/ekutils.c:1079:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(inCreatePrimary.inPublic.publicArea.unique.ecc.x.t.buffer, nonce, nonceSize);
data/tss2-1045/utils/encryptdecrypt.c:248:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.inData.t.buffer, buffer, length);
data/tss2-1045/utils/encryptdecrypt.c:262:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in2.inData.t.buffer, buffer, length);
data/tss2-1045/utils/eventextend.c:107:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    infile = fopen(infilename,"rb");
data/tss2-1045/utils/hash.c:209:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.data.t.buffer, buffer, length);
data/tss2-1045/utils/hash.c:223:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.data.t.buffer, inString, length);
data/tss2-1045/utils/hierarchycontrol.c:111:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		state = atoi(argv[i]);
data/tss2-1045/utils/hmac.c:262:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.buffer.t.buffer, buffer, length);
data/tss2-1045/utils/hmac.c:276:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.buffer.t.buffer, inString, length);
data/tss2-1045/utils/imaextend.c:111:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    infile = fopen(infilename,"rb");
data/tss2-1045/utils/imaextend.c:120:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char zeroDigest[SHA1_DIGEST_SIZE];
data/tss2-1045/utils/imaextend.c:121:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char oneDigest[SHA1_DIGEST_SIZE];
data/tss2-1045/utils/imaextend.c:163:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((uint8_t *)&in.digests.digests[0].digest, imaEvent.digest, SHA1_DIGEST_SIZE);
data/tss2-1045/utils/imaextend.c:164:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((uint8_t *)&in.digests.digests[1].digest, imaEvent.digest, SHA1_DIGEST_SIZE);
data/tss2-1045/utils/imalib.c:378:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&(imaEvent->digest), *buffer, sizeof(((ImaEvent *)NULL)->digest));
data/tss2-1045/utils/imalib.c:412:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&(imaEvent->name), *buffer, imaEvent->name_len);
data/tss2-1045/utils/imalib.c:467:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(imaEvent->template_data, *buffer, imaEvent->template_data_len);
data/tss2-1045/utils/imalib.c:575:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&(imaTemplateData->fileDataHash), buffer, imaTemplateData->fileDataHashLength);
data/tss2-1045/utils/imalib.c:605:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&(imaTemplateData->fileName), buffer, imaTemplateData->fileNameLength);
data/tss2-1045/utils/imalib.c:642:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&(imaTemplateData->sigHeader), buffer,
data/tss2-1045/utils/imalib.c:691:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&(imaTemplateData->signature), buffer,
data/tss2-1045/utils/imalib.c:806:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char zeroDigest[SHA256_DIGEST_SIZE];
data/tss2-1045/utils/imalib.c:807:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char oneDigest[SHA256_DIGEST_SIZE];
data/tss2-1045/utils/imalib.c:1017:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(p, "%08lx", (long unsigned int)imaEvent->pcrIndex);
data/tss2-1045/utils/imalib.c:1023:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(p, "%08lx", (long unsigned int)imaEvent->name_len);
data/tss2-1045/utils/imalib.c:1029:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(p, "%08lx", (long unsigned int)imaEvent->template_data_len);
data/tss2-1045/utils/imalib.h:117:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[TCG_EVENT_NAME_LEN_MAX + 1];
data/tss2-1045/utils/imalib.h:126:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char hashAlg[64+1];		/* FIXME need verification */
data/tss2-1045/utils/nvcertify.c:174:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		size = atoi(argv[i]);
data/tss2-1045/utils/nvcertify.c:184:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		offset = atoi(argv[i]);
data/tss2-1045/utils/nvdefinespace.c:189:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		dataSize = atoi(argv[i]);
data/tss2-1045/utils/nvread.c:128:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		offset = atoi(argv[i]);
data/tss2-1045/utils/nvread.c:139:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		readLength = atoi(argv[i]);
data/tss2-1045/utils/nvread.c:296:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(readBuffer + bytesRead, out.data.b.buffer, out.data.b.size);
data/tss2-1045/utils/nvreadpublic.c:243:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&tmp16, out.nvName.t.name, sizeof(uint16_t));
data/tss2-1045/utils/nvsetbits.c:103:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		bit = atoi(argv[i]);
data/tss2-1045/utils/nvwrite.c:152:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		pinPass = atoi(argv[i]);
data/tss2-1045/utils/nvwrite.c:155:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    pinLimit = atoi(argv[i]);
data/tss2-1045/utils/nvwrite.c:172:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		offset = atoi(argv[i]);
data/tss2-1045/utils/nvwrite.c:306:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(in.data.b.buffer, &tmpData, sizeof(tmpData));
data/tss2-1045/utils/nvwrite.c:308:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(in.data.b.buffer + sizeof(tmpData), &tmpData, sizeof(tmpData));
data/tss2-1045/utils/pcrextend.c:189:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((uint8_t *)&in.digests.digests[algs].digest,
data/tss2-1045/utils/pcrextend.c:211:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((uint8_t *)&in.digests.digests[algs].digest, fileData, length);
data/tss2-1045/utils/policycountertimer.c:113:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		offset = atoi(argv[i]);
data/tss2-1045/utils/policymaker.c:176:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	inFile = fopen(inFilename, "r");
data/tss2-1045/utils/policymaker.c:195:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char 		lineString[256];		/* returned line in hex ascii */
data/tss2-1045/utils/policymaker.c:196:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char 	lineBinary[128];		/* returned line in binary */
data/tss2-1045/utils/policymaker.c:227:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outFile = fopen(outFilename, "wb");
data/tss2-1045/utils/policymakerpcr.c:211:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	inFile = fopen(inFilename, "r");
data/tss2-1045/utils/policymakerpcr.c:238:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char 		lineString[256];		/* returned line in hex ascii */
data/tss2-1045/utils/policymakerpcr.c:303:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    outFile = fopen(outFilename, "wb");
data/tss2-1045/utils/policynv.c:146:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		offset = atoi(argv[i]);
data/tss2-1045/utils/policyor.c:66:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char 			*pHashListFilename[8];
data/tss2-1045/utils/policysecret.c:144:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		expiration = atoi(argv[i]);
data/tss2-1045/utils/policysigned.c:161:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		expiration = atoi(argv[i]);
data/tss2-1045/utils/policysigned.c:386:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	keyFile = fopen(signingKeyFilename, "r");
data/tss2-1045/utils/rsadecrypt.c:261:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.cipherText.t.buffer, buffer, length);
data/tss2-1045/utils/rsadecrypt.c:389:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(*buffer + *padLength - digestSize - oidSize, oid, oidSize);
data/tss2-1045/utils/rsaencrypt.c:148:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(in.message.t.buffer, buffer, length);
data/tss2-1045/utils/sequencecomplete.c:265:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(in.buffer.t.buffer, buffer, length);
data/tss2-1045/utils/sequenceupdate.c:213:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(in.buffer.t.buffer, buffer, length);
data/tss2-1045/utils/sign.c:295:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&in.digest.t.buffer, (uint8_t *)&digest.digest, sizeInBytes);
data/tss2-1045/utils/sign.c:362:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    unsigned char earr[3] = {0x01, 0x00, 0x01};
data/tss2-1045/utils/signapp.c:612:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&createIn.inPublic.publicArea.authPolicy.b.buffer, policy, sizeof(policy));
data/tss2-1045/utils/signapp.c:724:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&signIn.digest.t.buffer, (uint8_t *)&messageDigest->digest, sizeInBytes);
data/tss2-1045/utils/signapp.c:775:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&verifySignatureIn.digest.t.buffer, (uint8_t *)&messageDigest->digest, sizeInBytes);
data/tss2-1045/utils/stirrandom.c:113:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(in.inData.t.buffer, buffer, length);
data/tss2-1045/utils/timepacket.c:98:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		loops = atoi(argv[i]);
data/tss2-1045/utils/tss.c:755:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char 		*password[MAX_SESSION_NUM];
data/tss2-1045/utils/tss.c:1175:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	sessionFilename[128];
data/tss2-1045/utils/tss.c:1243:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		sessionFilename[128];
data/tss2-1045/utils/tss.c:1325:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(tssContext->sessions[slotIndex].sessionData, outBuffer, outLength);
data/tss2-1045/utils/tss.c:1603:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 	nameFilename[128];
data/tss2-1045/utils/tss.c:1649:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 		nameFilename[128];
data/tss2-1045/utils/tss.c:1855:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 	publicFilename[128];
data/tss2-1045/utils/tss.c:1903:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 	publicFilename[128];
data/tss2-1045/utils/tss.c:2117:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		filename[128];
data/tss2-1045/utils/tss.c:2191:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(name->t.name + sizeof(TPMI_ALG_HASH), (uint8_t *)&digest.digest, sizeInBytes);
data/tss2-1045/utils/tss.c:2194:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(name->t.name, (uint8_t *)&nameAlgNbo, sizeof(TPMI_ALG_HASH));
data/tss2-1045/utils/tss.c:2217:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 	nvpFilename[128];
data/tss2-1045/utils/tss.c:2243:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 	nvpFilename[128];
data/tss2-1045/utils/tss.c:2263:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char 	nvpFilename[128];
data/tss2-1045/utils/tss.c:2425:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(name->t.name + sizeof(TPMI_ALG_HASH), (uint8_t *)&digest.digest, sizeInBytes);
data/tss2-1045/utils/tss.c:2428:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(name->t.name, (uint8_t *)&nameAlgNbo, sizeof(TPMI_ALG_HASH));
data/tss2-1045/utils/tss.c:2893:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((uint8_t *)&actualHmac.digest, &authResponse->hmac.t.buffer,
data/tss2-1045/utils/tss.c:3266:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(iv.t.buffer, &symParmString[keySizeinBytes], iv.t.size);
data/tss2-1045/utils/tss.c:3517:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(iv.t.buffer, &symParmString[keySizeinBytes], iv.t.size);
data/tss2-1045/utils/tss.c:3613:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(password, in->newAuth.t.buffer, in->newAuth.t.size);
data/tss2-1045/utils/tss.c:3651:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(password, in->newAuth.t.buffer, in->newAuth.t.size);
data/tss2-1045/utils/tss.c:3879:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char earr[3] = {0x01, 0x00, 0x01};
data/tss2-1045/utils/tss.c:4063:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		string[65];	/*  sha256 hash * 2 + 1 */
data/tss2-1045/utils/tss.c:4119:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		string[65];	/*  sha256 hash * 2 + 1 */
data/tss2-1045/utils/tss.c:4183:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(str +(i*2), "%02x", digest[i]);
data/tss2-1045/utils/tssauth.c:1161:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(decryptParamBuffer, encryptParamBuffer, encryptParamSize);
data/tss2-1045/utils/tssauth.c:1326:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(encryptParamBuffer, decryptParamBuffer, decryptParamSize);
data/tss2-1045/utils/tsscrypto.c:890:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(secret +
data/tss2-1045/utils/tsscrypto.c:895:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(secret +
data/tss2-1045/utils/tsscrypto.c:917:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(sharedX_For_KDFE.t.buffer + 32 - lengthSharedXBin,
data/tss2-1045/utils/tsscrypto.c:935:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p_caller_X_For_KDFE.t.buffer + 32 - length_p_caller_Xbin,
data/tss2-1045/utils/tsscrypto.c:953:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p_tpmX_For_KDFE.t.buffer + 32 - length_p_tpmXbin,
data/tss2-1045/utils/tsscrypto.c:1100:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char 	userKey[AES_128_BLOCK_SIZE_BYTES];
data/tss2-1045/utils/tsscrypto.c:1134:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(userKey, envKeyBin, envKeyBinLen);  
data/tss2-1045/utils/tsscrypto.c:1181:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char	ivec[AES_128_BLOCK_SIZE_BYTES];       /* initial chaining vector */
data/tss2-1045/utils/tsscrypto.c:1198:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(decrypt_data_pad, decrypt_data, decrypt_length);
data/tss2-1045/utils/tsscrypto.c:1233:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char       ivec[AES_128_BLOCK_SIZE_BYTES];       /* initial chaining vector */
data/tss2-1045/utils/tsscrypto.c:1317:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(iv, dOut, blockSize);
data/tss2-1045/utils/tsscrypto.c:1352:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(iv, dIn, blockSize);
data/tss2-1045/utils/tsscryptoh.c:188:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(stream, &hmac.digest.tssmax, bytesThisPass);
data/tss2-1045/utils/tsscryptoh.c:257:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(stream, &digest.digest.tssmax, bytesThisPass);
data/tss2-1045/utils/tsscryptoh.c:380:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char       counter[4];     /* 4 octets */
data/tss2-1045/utils/tsscryptoh.c:406:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(counter, &count_n, 4);
data/tss2-1045/utils/tsscryptoh.c:415:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(mask + outLen, &digest.digest, digestSize);
data/tss2-1045/utils/tsscryptoh.c:426:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(mask + outLen, &digest.digest, maskLen - outLen);
data/tss2-1045/utils/tsscryptoh.c:516:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(db, &lHash.digest, hlen);			/* lHash */
data/tss2-1045/utils/tsscryptoh.c:525:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(db + emLen - fLen - hlen - 1, from, fLen);	/* M */
data/tss2-1045/utils/tssdev.c:114:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	tssContext->dev_fd = open(tssContext->tssDevice, O_RDWR);
data/tss2-1045/utils/tssfile.c:63:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	*file = fopen(filename, mode);
data/tss2-1045/utils/tssmarshal.c:2705:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(*buffer, source, sourceSize);
data/tss2-1045/utils/tsssocket.c:248:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&serv_addr.sin_addr, host->h_addr, host->h_length);
data/tss2-1045/utils/tssutils.c:277:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(target->buffer, source, length);
data/tss2-1045/utils/verifysignature.c:238:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&in.digest.t.buffer, (uint8_t *)&digest.digest, sizeInBytes);
data/tss2-1045/utils/verifysignature.c:244:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&in.digest.t.buffer, (uint8_t *)data, dataLength);
data/tss2-1045/utils/ekutils.c:504:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    rootFilenameLength = strlen(rootFilename[*rootFileCount]);
data/tss2-1045/utils/ekutils.c:967:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	pemLength = strlen(pemCertificate);
data/tss2-1045/utils/hash.c:214:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    length = strlen(inString);
data/tss2-1045/utils/hmac.c:267:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    length = strlen(inString);
data/tss2-1045/utils/imalib.c:530:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    hashAlgSize = strlen(imaTemplateData->hashAlg) + 1;
data/tss2-1045/utils/pcrevent.c:161:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (verbose) printf("Event data %u bytes\n", (unsigned int)strlen(data));
data/tss2-1045/utils/pcrextend.c:166:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((dataString != NULL) && (strlen(dataString) > sizeof(TPMU_HA))) {
data/tss2-1045/utils/pcrextend.c:187:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				(unsigned int)strlen(dataString), in.digests.count);
data/tss2-1045/utils/pcrextend.c:190:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		       dataString, strlen(dataString));
data/tss2-1045/utils/policymaker.c:204:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    lineLength = strlen(lineString);
data/tss2-1045/utils/policymakerpcr.c:251:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    lineLength = strlen(lineString);
data/tss2-1045/utils/signapp.c:196:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			       strlen(messageString), messageString,
data/tss2-1045/utils/timepacket.c:146:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(usec);
data/tss2-1045/utils/tss2/tsstransmit.h:65:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsscryptoh.c:182:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			       strlen(label) + 1, label,	/* KDFa label, use NUL as the KDFa
data/tss2-1045/utils/tsscryptoh.c:252:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			       strlen(label) + 1, label,	/* KDFe label, use NUL as the KDFe
data/tss2-1045/utils/tssdev.c:79:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tssdev.c:101:66:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = TSS_Dev_ReceiveCommand(tssContext->dev_fd, responseBuffer, read);
data/tss2-1045/utils/tssdev.c:173:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	irc = read(dev_fd, buffer, MAX_RESPONSE_SIZE);
data/tss2-1045/utils/tssdev.h:52:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			    uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tssprint.c:76:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strLength = strlen(string);
data/tss2-1045/utils/tsssocket.c:137:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			   uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsssocket.c:165:61:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = TSS_Socket_ReceiveCommand(tssContext, responseBuffer, read);
data/tss2-1045/utils/tsssocket.c:525:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nread = read(sock_fd, buffer, nleft);
data/tss2-1045/utils/tsssocket.h:56:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			       uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsstbsi.c:91:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				       uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsstbsi.c:109:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			 uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsstbsi.c:138:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				    responseBuffer, read,
data/tss2-1045/utils/tsstbsi.c:174:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				       uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsstbsi.c:195:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				  read);
data/tss2-1045/utils/tsstbsi.c:204:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				      responseBuffer, *read);
data/tss2-1045/utils/tsstbsi.h:52:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsstransmit.c:106:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    uint8_t *responseBuffer, uint32_t *read,
data/tss2-1045/utils/tsstransmit.c:115:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 responseBuffer, read,
data/tss2-1045/utils/tsstransmit.c:125:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			      responseBuffer, read,
data/tss2-1045/utils/tsstransmit.c:133:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			       responseBuffer, read,
data/tss2-1045/utils/tssutils.c:268:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    length = strlen(source);

ANALYSIS SUMMARY:

Hits = 210
Lines analyzed = 82300 in approximately 2.50 seconds (32873 lines/second)
Physical Source Lines of Code (SLOC) = 58612
Hits@level = [0] 4558 [1]  37 [2] 145 [3]  10 [4]  18 [5]   0
Hits@level+ = [0+] 4768 [1+] 210 [2+] 173 [3+]  28 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 81.3485 [1+] 3.58288 [2+] 2.95161 [3+] 0.477718 [4+] 0.307104 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.