tpm2-tss-4.1.3-7.fc43

List of Findings

Error: COMPILER_WARNING: [#def1]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_AC_GetCapability.c: scope_hint: In function ‘Esys_AC_GetCapability_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_AC_GetCapability.c:255:41: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  255 |         *capabilityData = calloc(sizeof(TPML_AC_CAPABILITIES), 1);
#      |                                         ^~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_AC_GetCapability.c:255:41: note: earlier argument should specify number of elements, later size of each element
#  253|       /* Allocate memory for response parameters */
#  254|       if (capabilityData != NULL) {
#  255|->         *capabilityData = calloc(sizeof(TPML_AC_CAPABILITIES), 1);
#  256|           if (*capabilityData == NULL) {
#  257|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def2]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_AC_Send.c: scope_hint: In function ‘Esys_AC_Send_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_AC_Send.c:264:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  264 |         *acDataOut = calloc(sizeof(TPMS_AC_OUTPUT), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_AC_Send.c:264:36: note: earlier argument should specify number of elements, later size of each element
#  262|       /* Allocate memory for response parameters */
#  263|       if (acDataOut != NULL) {
#  264|->         *acDataOut = calloc(sizeof(TPMS_AC_OUTPUT), 1);
#  265|           if (*acDataOut == NULL) {
#  266|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def3]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ActivateCredential.c: scope_hint: In function ‘Esys_ActivateCredential_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ActivateCredential.c:284:35: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  284 |         *certInfo = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                   ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ActivateCredential.c:284:35: note: earlier argument should specify number of elements, later size of each element
#  282|       /* Allocate memory for response parameters */
#  283|       if (certInfo != NULL) {
#  284|->         *certInfo = calloc(sizeof(TPM2B_DIGEST), 1);
#  285|           if (*certInfo == NULL) {
#  286|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def4]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Certify.c: scope_hint: In function ‘Esys_Certify_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Certify.c:288:38: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  288 |         *certifyInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                      ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Certify.c:288:38: note: earlier argument should specify number of elements, later size of each element
#  286|       /* Allocate memory for response parameters */
#  287|       if (certifyInfo != NULL) {
#  288|->         *certifyInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#  289|           if (*certifyInfo == NULL) {
#  290|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def5]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Certify.c:294:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  294 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Certify.c:294:36: note: earlier argument should specify number of elements, later size of each element
#  292|       }
#  293|       if (signature != NULL) {
#  294|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  295|           if (*signature == NULL) {
#  296|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def6]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyCreation.c: scope_hint: In function ‘Esys_CertifyCreation_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyCreation.c:298:38: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  298 |         *certifyInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                      ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyCreation.c:298:38: note: earlier argument should specify number of elements, later size of each element
#  296|       /* Allocate memory for response parameters */
#  297|       if (certifyInfo != NULL) {
#  298|->         *certifyInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#  299|           if (*certifyInfo == NULL) {
#  300|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def7]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyCreation.c:304:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  304 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyCreation.c:304:36: note: earlier argument should specify number of elements, later size of each element
#  302|       }
#  303|       if (signature != NULL) {
#  304|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  305|           if (*signature == NULL) {
#  306|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def8]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c: scope_hint: In function ‘Esys_CertifyX509_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c:296:45: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  296 |         *addedToCertificate = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#      |                                             ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c:296:45: note: earlier argument should specify number of elements, later size of each element
#  294|       /* Allocate memory for response parameters */
#  295|       if (addedToCertificate != NULL) {
#  296|->         *addedToCertificate = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#  297|           if (*addedToCertificate == NULL) {
#  298|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def9]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c:302:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  302 |         *tbsDigest = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                    ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c:302:36: note: earlier argument should specify number of elements, later size of each element
#  300|       }
#  301|       if (tbsDigest != NULL) {
#  302|->         *tbsDigest = calloc(sizeof(TPM2B_DIGEST), 1);
#  303|           if (*tbsDigest == NULL) {
#  304|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def10]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c:308:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  308 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CertifyX509.c:308:36: note: earlier argument should specify number of elements, later size of each element
#  306|       }
#  307|       if (signature != NULL) {
#  308|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  309|           if (*signature == NULL) {
#  310|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def11]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c: scope_hint: In function ‘Esys_Commit_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c:289:28: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  289 |         *K = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                            ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c:289:28: note: earlier argument should specify number of elements, later size of each element
#  287|       /* Allocate memory for response parameters */
#  288|       if (K != NULL) {
#  289|->         *K = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  290|           if (*K == NULL) {
#  291|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def12]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c:295:28: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  295 |         *L = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                            ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c:295:28: note: earlier argument should specify number of elements, later size of each element
#  293|       }
#  294|       if (L != NULL) {
#  295|->         *L = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  296|           if (*L == NULL) {
#  297|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def13]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c:301:28: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  301 |         *E = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                            ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Commit.c:301:28: note: earlier argument should specify number of elements, later size of each element
#  299|       }
#  300|       if (E != NULL) {
#  301|->         *E = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  302|           if (*E == NULL) {
#  303|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def14]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ContextSave.c: scope_hint: In function ‘Esys_ContextSave_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ContextSave.c:211:30: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  211 |     lcontext = calloc(sizeof(TPMS_CONTEXT), 1);
#      |                              ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ContextSave.c:211:30: note: earlier argument should specify number of elements, later size of each element
#  209|   
#  210|       /* Allocate memory for response parameters */
#  211|->     lcontext = calloc(sizeof(TPMS_CONTEXT), 1);
#  212|       if (lcontext == NULL) {
#  213|           return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def15]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c: scope_hint: In function ‘Esys_Create_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:338:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  338 |         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#      |                                     ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:338:37: note: earlier argument should specify number of elements, later size of each element
#  336|       /* Allocate memory for response parameters */
#  337|       if (outPrivate != NULL) {
#  338|->         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#  339|           if (*outPrivate == NULL) {
#  340|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def16]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:344:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  344 |         *outPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#      |                                    ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:344:36: note: earlier argument should specify number of elements, later size of each element
#  342|       }
#  343|       if (outPublic != NULL) {
#  344|->         *outPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#  345|           if (*outPublic == NULL) {
#  346|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def17]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:350:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  350 |         *creationData = calloc(sizeof(TPM2B_CREATION_DATA), 1);
#      |                                       ^~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:350:39: note: earlier argument should specify number of elements, later size of each element
#  348|       }
#  349|       if (creationData != NULL) {
#  350|->         *creationData = calloc(sizeof(TPM2B_CREATION_DATA), 1);
#  351|           if (*creationData == NULL) {
#  352|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def18]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:356:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  356 |         *creationHash = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                       ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:356:39: note: earlier argument should specify number of elements, later size of each element
#  354|       }
#  355|       if (creationHash != NULL) {
#  356|->         *creationHash = calloc(sizeof(TPM2B_DIGEST), 1);
#  357|           if (*creationHash == NULL) {
#  358|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def19]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:362:41: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  362 |         *creationTicket = calloc(sizeof(TPMT_TK_CREATION), 1);
#      |                                         ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Create.c:362:41: note: earlier argument should specify number of elements, later size of each element
#  360|       }
#  361|       if (creationTicket != NULL) {
#  362|->         *creationTicket = calloc(sizeof(TPMT_TK_CREATION), 1);
#  363|           if (*creationTicket == NULL) {
#  364|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def20]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreateLoaded.c: scope_hint: In function ‘Esys_CreateLoaded_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreateLoaded.c:328:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  328 |         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#      |                                     ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreateLoaded.c:328:37: note: earlier argument should specify number of elements, later size of each element
#  326|   
#  327|       if (outPrivate != NULL) {
#  328|->         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#  329|           if (*outPrivate == NULL) {
#  330|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def21]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreateLoaded.c:333:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  333 |     loutPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#      |                                ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreateLoaded.c:333:32: note: earlier argument should specify number of elements, later size of each element
#  331|           }
#  332|       }
#  333|->     loutPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#  334|       if (loutPublic == NULL) {
#  335|           goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def22]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c: scope_hint: In function ‘Esys_CreatePrimary_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:347:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  347 |     loutPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#      |                                ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:347:32: note: earlier argument should specify number of elements, later size of each element
#  345|           return r;
#  346|   
#  347|->     loutPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#  348|       if (loutPublic == NULL) {
#  349|           goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def23]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:352:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  352 |         *creationData = calloc(sizeof(TPM2B_CREATION_DATA), 1);
#      |                                       ^~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:352:39: note: earlier argument should specify number of elements, later size of each element
#  350|       }
#  351|       if (creationData != NULL) {
#  352|->         *creationData = calloc(sizeof(TPM2B_CREATION_DATA), 1);
#  353|           if (*creationData == NULL) {
#  354|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def24]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:358:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  358 |         *creationHash = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                       ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:358:39: note: earlier argument should specify number of elements, later size of each element
#  356|       }
#  357|       if (creationHash != NULL) {
#  358|->         *creationHash = calloc(sizeof(TPM2B_DIGEST), 1);
#  359|           if (*creationHash == NULL) {
#  360|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def25]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:364:41: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  364 |         *creationTicket = calloc(sizeof(TPMT_TK_CREATION), 1);
#      |                                         ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_CreatePrimary.c:364:41: note: earlier argument should specify number of elements, later size of each element
#  362|       }
#  363|       if (creationTicket != NULL) {
#  364|->         *creationTicket = calloc(sizeof(TPMT_TK_CREATION), 1);
#  365|           if (*creationTicket == NULL) {
#  366|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def26]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c: scope_hint: In function ‘Esys_Duplicate_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c:305:43: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  305 |         *encryptionKeyOut = calloc(sizeof(TPM2B_DATA), 1);
#      |                                           ^~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c:305:43: note: earlier argument should specify number of elements, later size of each element
#  303|       /* Allocate memory for response parameters */
#  304|       if (encryptionKeyOut != NULL) {
#  305|->         *encryptionKeyOut = calloc(sizeof(TPM2B_DATA), 1);
#  306|           if (*encryptionKeyOut == NULL) {
#  307|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def27]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c:311:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  311 |         *duplicate = calloc(sizeof(TPM2B_PRIVATE), 1);
#      |                                    ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c:311:36: note: earlier argument should specify number of elements, later size of each element
#  309|       }
#  310|       if (duplicate != NULL) {
#  311|->         *duplicate = calloc(sizeof(TPM2B_PRIVATE), 1);
#  312|           if (*duplicate == NULL) {
#  313|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def28]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c:317:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  317 |         *outSymSeed = calloc(sizeof(TPM2B_ENCRYPTED_SECRET), 1);
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Duplicate.c:317:37: note: earlier argument should specify number of elements, later size of each element
#  315|       }
#  316|       if (outSymSeed != NULL) {
#  317|->         *outSymSeed = calloc(sizeof(TPM2B_ENCRYPTED_SECRET), 1);
#  318|           if (*outSymSeed == NULL) {
#  319|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def29]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECC_Parameters.c: scope_hint: In function ‘Esys_ECC_Parameters_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECC_Parameters.c:246:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  246 |         *parameters = calloc(sizeof(TPMS_ALGORITHM_DETAIL_ECC), 1);
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECC_Parameters.c:246:37: note: earlier argument should specify number of elements, later size of each element
#  244|       /* Allocate memory for response parameters */
#  245|       if (parameters != NULL) {
#  246|->         *parameters = calloc(sizeof(TPMS_ALGORITHM_DETAIL_ECC), 1);
#  247|           if (*parameters == NULL) {
#  248|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def30]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_KeyGen.c: scope_hint: In function ‘Esys_ECDH_KeyGen_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_KeyGen.c:259:33: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  259 |         *zPoint = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                                 ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_KeyGen.c:259:33: note: earlier argument should specify number of elements, later size of each element
#  257|       /* Allocate memory for response parameters */
#  258|       if (zPoint != NULL) {
#  259|->         *zPoint = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  260|           if (*zPoint == NULL) {
#  261|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def31]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_KeyGen.c:265:35: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  265 |         *pubPoint = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                                   ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_KeyGen.c:265:35: note: earlier argument should specify number of elements, later size of each element
#  263|       }
#  264|       if (pubPoint != NULL) {
#  265|->         *pubPoint = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  266|           if (*pubPoint == NULL) {
#  267|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def32]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_ZGen.c: scope_hint: In function ‘Esys_ECDH_ZGen_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_ZGen.c:258:35: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  258 |         *outPoint = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                                   ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ECDH_ZGen.c:258:35: note: earlier argument should specify number of elements, later size of each element
#  256|       /* Allocate memory for response parameters */
#  257|       if (outPoint != NULL) {
#  258|->         *outPoint = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  259|           if (*outPoint == NULL) {
#  260|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def33]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EC_Ephemeral.c: scope_hint: In function ‘Esys_EC_Ephemeral_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EC_Ephemeral.c:244:28: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  244 |         *Q = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                            ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EC_Ephemeral.c:244:28: note: earlier argument should specify number of elements, later size of each element
#  242|       /* Allocate memory for response parameters */
#  243|       if (Q != NULL) {
#  244|->         *Q = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  245|           if (*Q == NULL) {
#  246|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def34]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt.c: scope_hint: In function ‘Esys_EncryptDecrypt_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt.c:285:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  285 |         *outData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#      |                                  ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt.c:285:34: note: earlier argument should specify number of elements, later size of each element
#  283|       /* Allocate memory for response parameters */
#  284|       if (outData != NULL) {
#  285|->         *outData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#  286|           if (*outData == NULL) {
#  287|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def35]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt.c:291:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  291 |         *ivOut = calloc(sizeof(TPM2B_IV), 1);
#      |                                ^~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt.c:291:32: note: earlier argument should specify number of elements, later size of each element
#  289|       }
#  290|       if (ivOut != NULL) {
#  291|->         *ivOut = calloc(sizeof(TPM2B_IV), 1);
#  292|           if (*ivOut == NULL) {
#  293|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def36]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt2.c: scope_hint: In function ‘Esys_EncryptDecrypt2_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt2.c:279:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  279 |         *outData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#      |                                  ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt2.c:279:34: note: earlier argument should specify number of elements, later size of each element
#  277|       /* Allocate memory for response parameters */
#  278|       if (outData != NULL) {
#  279|->         *outData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#  280|           if (*outData == NULL) {
#  281|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def37]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt2.c:285:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  285 |         *ivOut = calloc(sizeof(TPM2B_IV), 1);
#      |                                ^~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EncryptDecrypt2.c:285:32: note: earlier argument should specify number of elements, later size of each element
#  283|       }
#  284|       if (ivOut != NULL) {
#  285|->         *ivOut = calloc(sizeof(TPM2B_IV), 1);
#  286|           if (*ivOut == NULL) {
#  287|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def38]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EventSequenceComplete.c: scope_hint: In function ‘Esys_EventSequenceComplete_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EventSequenceComplete.c:280:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  280 |         *results = calloc(sizeof(TPML_DIGEST_VALUES), 1);
#      |                                  ^~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_EventSequenceComplete.c:280:34: note: earlier argument should specify number of elements, later size of each element
#  278|       /* Allocate memory for response parameters */
#  279|       if (results != NULL) {
#  280|->         *results = calloc(sizeof(TPML_DIGEST_VALUES), 1);
#  281|           if (*results == NULL) {
#  282|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def39]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FieldUpgradeData.c: scope_hint: In function ‘Esys_FieldUpgradeData_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FieldUpgradeData.c:246:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  246 |         *nextDigest = calloc(sizeof(TPMT_HA), 1);
#      |                                     ^~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FieldUpgradeData.c:246:37: note: earlier argument should specify number of elements, later size of each element
#  244|       /* Allocate memory for response parameters */
#  245|       if (nextDigest != NULL) {
#  246|->         *nextDigest = calloc(sizeof(TPMT_HA), 1);
#  247|           if (*nextDigest == NULL) {
#  248|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def40]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FieldUpgradeData.c:252:38: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  252 |         *firstDigest = calloc(sizeof(TPMT_HA), 1);
#      |                                      ^~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FieldUpgradeData.c:252:38: note: earlier argument should specify number of elements, later size of each element
#  250|       }
#  251|       if (firstDigest != NULL) {
#  252|->         *firstDigest = calloc(sizeof(TPMT_HA), 1);
#  253|           if (*firstDigest == NULL) {
#  254|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def41]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FirmwareRead.c: scope_hint: In function ‘Esys_FirmwareRead_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FirmwareRead.c:242:33: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  242 |         *fuData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#      |                                 ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_FirmwareRead.c:242:33: note: earlier argument should specify number of elements, later size of each element
#  240|       /* Allocate memory for response parameters */
#  241|       if (fuData != NULL) {
#  242|->         *fuData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#  243|           if (*fuData == NULL) {
#  244|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def42]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCapability.c: scope_hint: In function ‘Esys_GetCapability_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCapability.c:264:41: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  264 |         *capabilityData = calloc(sizeof(TPMS_CAPABILITY_DATA), 1);
#      |                                         ^~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCapability.c:264:41: note: earlier argument should specify number of elements, later size of each element
#  262|       /* Allocate memory for response parameters */
#  263|       if (capabilityData != NULL) {
#  264|->         *capabilityData = calloc(sizeof(TPMS_CAPABILITY_DATA), 1);
#  265|           if (*capabilityData == NULL) {
#  266|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def43]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCommandAuditDigest.c: scope_hint: In function ‘Esys_GetCommandAuditDigest_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCommandAuditDigest.c:286:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  286 |         *auditInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                    ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCommandAuditDigest.c:286:36: note: earlier argument should specify number of elements, later size of each element
#  284|       /* Allocate memory for response parameters */
#  285|       if (auditInfo != NULL) {
#  286|->         *auditInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#  287|           if (*auditInfo == NULL) {
#  288|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def44]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCommandAuditDigest.c:292:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  292 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetCommandAuditDigest.c:292:36: note: earlier argument should specify number of elements, later size of each element
#  290|       }
#  291|       if (signature != NULL) {
#  292|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  293|           if (*signature == NULL) {
#  294|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def45]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetRandom.c: scope_hint: In function ‘Esys_GetRandom_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetRandom.c:240:38: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  240 |         *randomBytes = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                      ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetRandom.c:240:38: note: earlier argument should specify number of elements, later size of each element
#  238|       /* Allocate memory for response parameters */
#  239|       if (randomBytes != NULL) {
#  240|->         *randomBytes = calloc(sizeof(TPM2B_DIGEST), 1);
#  241|           if (*randomBytes == NULL) {
#  242|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def46]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetSessionAuditDigest.c: scope_hint: In function ‘Esys_GetSessionAuditDigest_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetSessionAuditDigest.c:300:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  300 |         *auditInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                    ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetSessionAuditDigest.c:300:36: note: earlier argument should specify number of elements, later size of each element
#  298|       /* Allocate memory for response parameters */
#  299|       if (auditInfo != NULL) {
#  300|->         *auditInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#  301|           if (*auditInfo == NULL) {
#  302|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def47]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetSessionAuditDigest.c:306:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  306 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetSessionAuditDigest.c:306:36: note: earlier argument should specify number of elements, later size of each element
#  304|       }
#  305|       if (signature != NULL) {
#  306|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  307|           if (*signature == NULL) {
#  308|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def48]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTestResult.c: scope_hint: In function ‘Esys_GetTestResult_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTestResult.c:239:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  239 |         *outData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#      |                                  ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTestResult.c:239:34: note: earlier argument should specify number of elements, later size of each element
#  237|       /* Allocate memory for response parameters */
#  238|       if (outData != NULL) {
#  239|->         *outData = calloc(sizeof(TPM2B_MAX_BUFFER), 1);
#  240|           if (*outData == NULL) {
#  241|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def49]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTime.c: scope_hint: In function ‘Esys_GetTime_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTime.c:284:35: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  284 |         *timeInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                   ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTime.c:284:35: note: earlier argument should specify number of elements, later size of each element
#  282|       /* Allocate memory for response parameters */
#  283|       if (timeInfo != NULL) {
#  284|->         *timeInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#  285|           if (*timeInfo == NULL) {
#  286|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def50]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTime.c:290:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  290 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_GetTime.c:290:36: note: earlier argument should specify number of elements, later size of each element
#  288|       }
#  289|       if (signature != NULL) {
#  290|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  291|           if (*signature == NULL) {
#  292|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def51]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_HMAC.c: scope_hint: In function ‘Esys_HMAC_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_HMAC.c:263:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  263 |         *outHMAC = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                  ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_HMAC.c:263:34: note: earlier argument should specify number of elements, later size of each element
#  261|       /* Allocate memory for response parameters */
#  262|       if (outHMAC != NULL) {
#  263|->         *outHMAC = calloc(sizeof(TPM2B_DIGEST), 1);
#  264|           if (*outHMAC == NULL) {
#  265|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def52]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Hash.c: scope_hint: In function ‘Esys_Hash_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Hash.c:263:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  263 |         *outHash = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                  ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Hash.c:263:34: note: earlier argument should specify number of elements, later size of each element
#  261|       /* Allocate memory for response parameters */
#  262|       if (outHash != NULL) {
#  263|->         *outHash = calloc(sizeof(TPM2B_DIGEST), 1);
#  264|           if (*outHash == NULL) {
#  265|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def53]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Hash.c:269:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  269 |         *validation = calloc(sizeof(TPMT_TK_HASHCHECK), 1);
#      |                                     ^~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Hash.c:269:37: note: earlier argument should specify number of elements, later size of each element
#  267|       }
#  268|       if (validation != NULL) {
#  269|->         *validation = calloc(sizeof(TPMT_TK_HASHCHECK), 1);
#  270|           if (*validation == NULL) {
#  271|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def54]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Import.c: scope_hint: In function ‘Esys_Import_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Import.c:286:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  286 |         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#      |                                     ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Import.c:286:37: note: earlier argument should specify number of elements, later size of each element
#  284|       /* Allocate memory for response parameters */
#  285|       if (outPrivate != NULL) {
#  286|->         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#  287|           if (*outPrivate == NULL) {
#  288|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def55]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_IncrementalSelfTest.c: scope_hint: In function ‘Esys_IncrementalSelfTest_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_IncrementalSelfTest.c:246:35: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  246 |         *toDoList = calloc(sizeof(TPML_ALG), 1);
#      |                                   ^~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_IncrementalSelfTest.c:246:35: note: earlier argument should specify number of elements, later size of each element
#  244|       /* Allocate memory for response parameters */
#  245|       if (toDoList != NULL) {
#  246|->         *toDoList = calloc(sizeof(TPML_ALG), 1);
#  247|           if (*toDoList == NULL) {
#  248|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def56]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MAC.c: scope_hint: In function ‘Esys_MAC_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MAC.c:265:33: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  265 |         *outMAC = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                 ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MAC.c:265:33: note: earlier argument should specify number of elements, later size of each element
#  263|       /* Allocate memory for response parameters */
#  264|       if (outMAC != NULL) {
#  265|->         *outMAC = calloc(sizeof(TPM2B_DIGEST), 1);
#  266|           if (*outMAC == NULL) {
#  267|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def57]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MakeCredential.c: scope_hint: In function ‘Esys_MakeCredential_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MakeCredential.c:267:41: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  267 |         *credentialBlob = calloc(sizeof(TPM2B_ID_OBJECT), 1);
#      |                                         ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MakeCredential.c:267:41: note: earlier argument should specify number of elements, later size of each element
#  265|       /* Allocate memory for response parameters */
#  266|       if (credentialBlob != NULL) {
#  267|->         *credentialBlob = calloc(sizeof(TPM2B_ID_OBJECT), 1);
#  268|           if (*credentialBlob == NULL) {
#  269|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def58]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MakeCredential.c:273:33: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  273 |         *secret = calloc(sizeof(TPM2B_ENCRYPTED_SECRET), 1);
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_MakeCredential.c:273:33: note: earlier argument should specify number of elements, later size of each element
#  271|       }
#  272|       if (secret != NULL) {
#  273|->         *secret = calloc(sizeof(TPM2B_ENCRYPTED_SECRET), 1);
#  274|           if (*secret == NULL) {
#  275|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def59]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Certify.c: scope_hint: In function ‘Esys_NV_Certify_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Certify.c:310:38: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  310 |         *certifyInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                      ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Certify.c:310:38: note: earlier argument should specify number of elements, later size of each element
#  308|       /* Allocate memory for response parameters */
#  309|       if (certifyInfo != NULL) {
#  310|->         *certifyInfo = calloc(sizeof(TPM2B_ATTEST), 1);
#  311|           if (*certifyInfo == NULL) {
#  312|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def60]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Certify.c:316:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  316 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Certify.c:316:36: note: earlier argument should specify number of elements, later size of each element
#  314|       }
#  315|       if (signature != NULL) {
#  316|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  317|           if (*signature == NULL) {
#  318|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def61]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Read.c: scope_hint: In function ‘Esys_NV_Read_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Read.c:278:31: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  278 |         *data = calloc(sizeof(TPM2B_MAX_NV_BUFFER), 1);
#      |                               ^~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_Read.c:278:31: note: earlier argument should specify number of elements, later size of each element
#  276|       /* Allocate memory for response parameters */
#  277|       if (data != NULL) {
#  278|->         *data = calloc(sizeof(TPM2B_MAX_NV_BUFFER), 1);
#  279|           if (*data == NULL) {
#  280|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def62]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_ReadPublic.c: scope_hint: In function ‘Esys_NV_ReadPublic_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_ReadPublic.c:269:31: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  269 |     lnvPublic = calloc(sizeof(TPM2B_NV_PUBLIC), 1);
#      |                               ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_ReadPublic.c:269:31: note: earlier argument should specify number of elements, later size of each element
#  267|   
#  268|       /* Allocate memory for response parameters */
#  269|->     lnvPublic = calloc(sizeof(TPM2B_NV_PUBLIC), 1);
#  270|       if (lnvPublic == NULL) {
#  271|           return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def63]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_ReadPublic.c:273:29: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  273 |     lnvName = calloc(sizeof(TPM2B_NAME), 1);
#      |                             ^~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_NV_ReadPublic.c:273:29: note: earlier argument should specify number of elements, later size of each element
#  271|           return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");
#  272|       }
#  273|->     lnvName = calloc(sizeof(TPM2B_NAME), 1);
#  274|       if (lnvName == NULL) {
#  275|           goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def64]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ObjectChangeAuth.c: scope_hint: In function ‘Esys_ObjectChangeAuth_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ObjectChangeAuth.c:287:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  287 |         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#      |                                     ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ObjectChangeAuth.c:287:37: note: earlier argument should specify number of elements, later size of each element
#  285|       /* Allocate memory for response parameters */
#  286|       if (outPrivate != NULL) {
#  287|->         *outPrivate = calloc(sizeof(TPM2B_PRIVATE), 1);
#  288|           if (*outPrivate == NULL) {
#  289|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def65]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Event.c: scope_hint: In function ‘Esys_PCR_Event_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Event.c:262:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  262 |         *digests = calloc(sizeof(TPML_DIGEST_VALUES), 1);
#      |                                  ^~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Event.c:262:34: note: earlier argument should specify number of elements, later size of each element
#  260|       /* Allocate memory for response parameters */
#  261|       if (digests != NULL) {
#  262|->         *digests = calloc(sizeof(TPML_DIGEST_VALUES), 1);
#  263|           if (*digests == NULL) {
#  264|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def66]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Read.c: scope_hint: In function ‘Esys_PCR_Read_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Read.c:261:42: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  261 |         *pcrSelectionOut = calloc(sizeof(TPML_PCR_SELECTION), 1);
#      |                                          ^~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Read.c:261:42: note: earlier argument should specify number of elements, later size of each element
#  259|       /* Allocate memory for response parameters */
#  260|       if (pcrSelectionOut != NULL) {
#  261|->         *pcrSelectionOut = calloc(sizeof(TPML_PCR_SELECTION), 1);
#  262|           if (*pcrSelectionOut == NULL) {
#  263|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def67]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Read.c:267:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  267 |         *pcrValues = calloc(sizeof(TPML_DIGEST), 1);
#      |                                    ^~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PCR_Read.c:267:36: note: earlier argument should specify number of elements, later size of each element
#  265|       }
#  266|       if (pcrValues != NULL) {
#  267|->         *pcrValues = calloc(sizeof(TPML_DIGEST), 1);
#  268|           if (*pcrValues == NULL) {
#  269|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def68]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicyGetDigest.c: scope_hint: In function ‘Esys_PolicyGetDigest_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicyGetDigest.c:256:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  256 |         *policyDigest = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                       ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicyGetDigest.c:256:39: note: earlier argument should specify number of elements, later size of each element
#  254|       /* Allocate memory for response parameters */
#  255|       if (policyDigest != NULL) {
#  256|->         *policyDigest = calloc(sizeof(TPM2B_DIGEST), 1);
#  257|           if (*policyDigest == NULL) {
#  258|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def69]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySecret.c: scope_hint: In function ‘Esys_PolicySecret_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySecret.c:300:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  300 |         *timeout = calloc(sizeof(TPM2B_TIMEOUT), 1);
#      |                                  ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySecret.c:300:34: note: earlier argument should specify number of elements, later size of each element
#  298|       /* Allocate memory for response parameters */
#  299|       if (timeout != NULL) {
#  300|->         *timeout = calloc(sizeof(TPM2B_TIMEOUT), 1);
#  301|           if (*timeout == NULL) {
#  302|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def70]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySecret.c:306:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  306 |         *policyTicket = calloc(sizeof(TPMT_TK_AUTH), 1);
#      |                                       ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySecret.c:306:39: note: earlier argument should specify number of elements, later size of each element
#  304|       }
#  305|       if (policyTicket != NULL) {
#  306|->         *policyTicket = calloc(sizeof(TPMT_TK_AUTH), 1);
#  307|           if (*policyTicket == NULL) {
#  308|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def71]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySigned.c: scope_hint: In function ‘Esys_PolicySigned_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySigned.c:300:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  300 |         *timeout = calloc(sizeof(TPM2B_TIMEOUT), 1);
#      |                                  ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySigned.c:300:34: note: earlier argument should specify number of elements, later size of each element
#  298|       /* Allocate memory for response parameters */
#  299|       if (timeout != NULL) {
#  300|->         *timeout = calloc(sizeof(TPM2B_TIMEOUT), 1);
#  301|           if (*timeout == NULL) {
#  302|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def72]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySigned.c:306:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  306 |         *policyTicket = calloc(sizeof(TPMT_TK_AUTH), 1);
#      |                                       ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_PolicySigned.c:306:39: note: earlier argument should specify number of elements, later size of each element
#  304|       }
#  305|       if (policyTicket != NULL) {
#  306|->         *policyTicket = calloc(sizeof(TPMT_TK_AUTH), 1);
#  307|           if (*policyTicket == NULL) {
#  308|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def73]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Quote.c: scope_hint: In function ‘Esys_Quote_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Quote.c:274:33: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  274 |         *quoted = calloc(sizeof(TPM2B_ATTEST), 1);
#      |                                 ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Quote.c:274:33: note: earlier argument should specify number of elements, later size of each element
#  272|       /* Allocate memory for response parameters */
#  273|       if (quoted != NULL) {
#  274|->         *quoted = calloc(sizeof(TPM2B_ATTEST), 1);
#  275|           if (*quoted == NULL) {
#  276|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def74]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Quote.c:280:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  280 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Quote.c:280:36: note: earlier argument should specify number of elements, later size of each element
#  278|       }
#  279|       if (signature != NULL) {
#  280|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  281|           if (*signature == NULL) {
#  282|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def75]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_RSA_Decrypt.c: scope_hint: In function ‘Esys_RSA_Decrypt_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_RSA_Decrypt.c:268:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  268 |         *message = calloc(sizeof(TPM2B_PUBLIC_KEY_RSA), 1);
#      |                                  ^~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_RSA_Decrypt.c:268:34: note: earlier argument should specify number of elements, later size of each element
#  266|       /* Allocate memory for response parameters */
#  267|       if (message != NULL) {
#  268|->         *message = calloc(sizeof(TPM2B_PUBLIC_KEY_RSA), 1);
#  269|           if (*message == NULL) {
#  270|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def76]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_RSA_Encrypt.c: scope_hint: In function ‘Esys_RSA_Encrypt_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_RSA_Encrypt.c:265:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  265 |         *outData = calloc(sizeof(TPM2B_PUBLIC_KEY_RSA), 1);
#      |                                  ^~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_RSA_Encrypt.c:265:34: note: earlier argument should specify number of elements, later size of each element
#  263|       /* Allocate memory for response parameters */
#  264|       if (outData != NULL) {
#  265|->         *outData = calloc(sizeof(TPM2B_PUBLIC_KEY_RSA), 1);
#  266|           if (*outData == NULL) {
#  267|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def77]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadClock.c: scope_hint: In function ‘Esys_ReadClock_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadClock.c:241:38: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  241 |         *currentTime = calloc(sizeof(TPMS_TIME_INFO), 1);
#      |                                      ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadClock.c:241:38: note: earlier argument should specify number of elements, later size of each element
#  239|       /* Allocate memory for response parameters */
#  240|       if (currentTime != NULL) {
#  241|->         *currentTime = calloc(sizeof(TPMS_TIME_INFO), 1);
#  242|           if (*currentTime == NULL) {
#  243|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def78]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c: scope_hint: In function ‘Esys_ReadPublic_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c:271:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  271 |         *outPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#      |                                    ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c:271:36: note: earlier argument should specify number of elements, later size of each element
#  269|       /* Allocate memory for response parameters */
#  270|       if (outPublic != NULL) {
#  271|->         *outPublic = calloc(sizeof(TPM2B_PUBLIC), 1);
#  272|           if (*outPublic == NULL) {
#  273|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def79]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c:277:31: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  277 |         *name = calloc(sizeof(TPM2B_NAME), 1);
#      |                               ^~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c:277:31: note: earlier argument should specify number of elements, later size of each element
#  275|       }
#  276|       if (name != NULL) {
#  277|->         *name = calloc(sizeof(TPM2B_NAME), 1);
#  278|           if (*name == NULL) {
#  279|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def80]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c:283:40: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  283 |         *qualifiedName = calloc(sizeof(TPM2B_NAME), 1);
#      |                                        ^~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ReadPublic.c:283:40: note: earlier argument should specify number of elements, later size of each element
#  281|       }
#  282|       if (qualifiedName != NULL) {
#  283|->         *qualifiedName = calloc(sizeof(TPM2B_NAME), 1);
#  284|           if (*qualifiedName == NULL) {
#  285|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def81]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Rewrap.c: scope_hint: In function ‘Esys_Rewrap_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Rewrap.c:288:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  288 |         *outDuplicate = calloc(sizeof(TPM2B_PRIVATE), 1);
#      |                                       ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Rewrap.c:288:39: note: earlier argument should specify number of elements, later size of each element
#  286|       /* Allocate memory for response parameters */
#  287|       if (outDuplicate != NULL) {
#  288|->         *outDuplicate = calloc(sizeof(TPM2B_PRIVATE), 1);
#  289|           if (*outDuplicate == NULL) {
#  290|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def82]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Rewrap.c:294:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  294 |         *outSymSeed = calloc(sizeof(TPM2B_ENCRYPTED_SECRET), 1);
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Rewrap.c:294:37: note: earlier argument should specify number of elements, later size of each element
#  292|       }
#  293|       if (outSymSeed != NULL) {
#  294|->         *outSymSeed = calloc(sizeof(TPM2B_ENCRYPTED_SECRET), 1);
#  295|           if (*outSymSeed == NULL) {
#  296|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def83]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_SequenceComplete.c: scope_hint: In function ‘Esys_SequenceComplete_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_SequenceComplete.c:290:33: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  290 |         *result = calloc(sizeof(TPM2B_DIGEST), 1);
#      |                                 ^~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_SequenceComplete.c:290:33: note: earlier argument should specify number of elements, later size of each element
#  288|       /* Allocate memory for response parameters */
#  289|       if (result != NULL) {
#  290|->         *result = calloc(sizeof(TPM2B_DIGEST), 1);
#  291|           if (*result == NULL) {
#  292|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def84]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_SequenceComplete.c:296:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  296 |         *validation = calloc(sizeof(TPMT_TK_HASHCHECK), 1);
#      |                                     ^~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_SequenceComplete.c:296:37: note: earlier argument should specify number of elements, later size of each element
#  294|       }
#  295|       if (validation != NULL) {
#  296|->         *validation = calloc(sizeof(TPMT_TK_HASHCHECK), 1);
#  297|           if (*validation == NULL) {
#  298|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: COMPILER_WARNING: [#def85]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Sign.c: scope_hint: In function ‘Esys_Sign_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Sign.c:274:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  274 |         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#      |                                    ^~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Sign.c:274:36: note: earlier argument should specify number of elements, later size of each element
#  272|       /* Allocate memory for response parameters */
#  273|       if (signature != NULL) {
#  274|->         *signature = calloc(sizeof(TPMT_SIGNATURE), 1);
#  275|           if (*signature == NULL) {
#  276|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def86]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Unseal.c: scope_hint: In function ‘Esys_Unseal_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Unseal.c:258:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  258 |         *outData = calloc(sizeof(TPM2B_SENSITIVE_DATA), 1);
#      |                                  ^~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Unseal.c:258:34: note: earlier argument should specify number of elements, later size of each element
#  256|       /* Allocate memory for response parameters */
#  257|       if (outData != NULL) {
#  258|->         *outData = calloc(sizeof(TPM2B_SENSITIVE_DATA), 1);
#  259|           if (*outData == NULL) {
#  260|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def87]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Vendor_TCG_Test.c: scope_hint: In function ‘Esys_Vendor_TCG_Test_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Vendor_TCG_Test.c:234:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  234 |         *outputData = calloc(sizeof(TPM2B_DATA), 1);
#      |                                     ^~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_Vendor_TCG_Test.c:234:37: note: earlier argument should specify number of elements, later size of each element
#  232|       /* Allocate memory for response parameters */
#  233|       if (outputData != NULL) {
#  234|->         *outputData = calloc(sizeof(TPM2B_DATA), 1);
#  235|           if (*outputData == NULL) {
#  236|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def88]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_VerifySignature.c: scope_hint: In function ‘Esys_VerifySignature_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_VerifySignature.c:265:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  265 |         *validation = calloc(sizeof(TPMT_TK_VERIFIED), 1);
#      |                                     ^~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_VerifySignature.c:265:37: note: earlier argument should specify number of elements, later size of each element
#  263|       /* Allocate memory for response parameters */
#  264|       if (validation != NULL) {
#  265|->         *validation = calloc(sizeof(TPMT_TK_VERIFIED), 1);
#  266|           if (*validation == NULL) {
#  267|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def89]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ZGen_2Phase.c: scope_hint: In function ‘Esys_ZGen_2Phase_Finish’
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ZGen_2Phase.c:281:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  281 |         *outZ1 = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                                ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ZGen_2Phase.c:281:32: note: earlier argument should specify number of elements, later size of each element
#  279|       /* Allocate memory for response parameters */
#  280|       if (outZ1 != NULL) {
#  281|->         *outZ1 = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  282|           if (*outZ1 == NULL) {
#  283|               return_error(TSS2_ESYS_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def90]
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ZGen_2Phase.c:287:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  287 |         *outZ2 = calloc(sizeof(TPM2B_ECC_POINT), 1);
#      |                                ^~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-esys/api/Esys_ZGen_2Phase.c:287:32: note: earlier argument should specify number of elements, later size of each element
#  285|       }
#  286|       if (outZ2 != NULL) {
#  287|->         *outZ2 = calloc(sizeof(TPM2B_ECC_POINT), 1);
#  288|           if (*outZ2 == NULL) {
#  289|               goto_error(r, TSS2_ESYS_RC_MEMORY, "Out of memory", error_cleanup);

Error: GCC_ANALYZER_WARNING (CWE-465): [#def91]
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:338:13: warning[-Wanalyzer-deref-before-check]: check of ‘signature’ for NULL after already dereferencing it
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:258:5: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:263:31: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:327:13: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:328:13: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:328:13: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:330:13: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:330:13: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:333:40: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:335:13: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:337:17: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_AuthorizePolicy.c:338:13: danger: pointer ‘signature’ is checked for NULL here but it was already dereferenced at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  336|               authorization->key =
#  337|                   (*keyObject)->misc.key.public.publicArea;
#  338|->             SAFE_FREE(signature);
#  339|               ifapi_cleanup_ifapi_object(*keyObject);
#  340|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def92]
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:401:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*context.cmd.Provision.hierarchy_he.misc.ext_pub_key.certificate’
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:374:5: branch_false: following ‘false’ branch (when ‘context’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:375:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:375:5: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:378:12: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:389:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:393:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:395:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:398:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:398:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:400:29: acquire_memory: this call could return NULL
tpm2-tss-4.1.3/src/tss2-fapi/api/Fapi_Delete.c:401:9: danger: ‘calloc(1, 8)’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  399|           command->numPaths = 1;
#  400|           command->pathlist = calloc(1, sizeof(char *));
#  401|->         strdup_check(command->pathlist[0], path, r, error_cleanup);
#  402|       }
#  403|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def93]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:358:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘hash_str’ where non-null expected
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:352:8: branch_false: following ‘false’ branch (when ‘vendor != 1229870147’)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:355:26: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:355:26: acquire_memory: this call could return NULL
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:356:28: branch_true: following ‘true’ branch (when ‘i != 16’)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:358:64: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_get_web_cert.c:358:17: danger: argument 1 (‘hash_str + i * 2’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  356|           for (size_t i = 0; i < AMD_EK_URI_LEN; i++)
#  357|               {
#  358|->                 sprintf((char*)(hash_str + (i*2)), "%02x", hash[i]);
#  359|               }
#  360|           hash_str[AMD_EK_URI_LEN * 2] = '\0';

Error: CPPCHECK_WARNING (CWE-476): [#def94]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1404: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: to_policy
# 1402|       to_policy = calloc(1, sizeof(TPML_POLICYELEMENTS) +
# 1403|                          from_policy->count * sizeof(TPMT_POLICYELEMENT));
# 1404|->     to_policy->count = from_policy->count;
# 1405|       for (i = 0; i < from_policy->count; i++) {
# 1406|           if (from_policy->elements[i].type == POLICYOR) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def95]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1404:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘to_policy’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1435:1: enter_function: entry to ‘ifapi_copy_policy’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1438:8: branch_false: following ‘false’ branch (when ‘from_policy’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1441:30: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1442:8: branch_false: following ‘false’ branch (when ‘to_policy’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1446:17: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_helpers.c:1446:17: call_function: calling ‘copy_policy’ from ‘ifapi_copy_policy’
# 1402|       to_policy = calloc(1, sizeof(TPML_POLICYELEMENTS) +
# 1403|                          from_policy->count * sizeof(TPMT_POLICYELEMENT));
# 1404|->     to_policy->count = from_policy->count;
# 1405|       for (i = 0; i < from_policy->count; i++) {
# 1406|           if (from_policy->elements[i].type == POLICYOR) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def96]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:659:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:719:1: enter_function: entry to ‘ifapi_read_ima_event_log’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:732:5: branch_false: following ‘false’ branch (when ‘jso_list’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:735:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:736:10: acquire_resource: opened here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:737:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:738:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:741:5: branch_false: following ‘false’ branch...
 branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:744:12: call_function: calling ‘read_ima_header’ from ‘ifapi_read_ima_event_log’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:744:12: return_function: returning to ‘ifapi_read_ima_event_log’ from ‘read_ima_header’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:744:12: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:745:13: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:659:18: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  657|       *rc = TSS2_RC_SUCCESS;
#  658|   
#  659|->     size = fread(&template->header, 1, header_size, fp);
#  660|       if (size == 0) {
#  661|           return size;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:659:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:719:1: enter_function: entry to ‘ifapi_read_ima_event_log’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:732:5: branch_false: following ‘false’ branch (when ‘jso_list’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:735:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:736:10: acquire_memory: allocated here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:737:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:738:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:741:5: branch_false: following ‘false’ branch...
 branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:744:12: call_function: calling ‘read_ima_header’ from ‘ifapi_read_ima_event_log’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:744:12: return_function: returning to ‘ifapi_read_ima_event_log’ from ‘read_ima_header’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:744:12: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:745:13: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_ima_eventlog.c:659:18: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
#  657|       *rc = TSS2_RC_SUCCESS;
#  658|   
#  659|->     size = fread(&template->header, 1, header_size, fp);
#  660|       if (size == 0) {
#  661|           return size;

Error: COMPILER_WARNING: [#def98]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_io.c: scope_hint: In function ‘dirfiles_all’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_io.c:584:53: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  584 |             NODE_OBJECT_T *file_obj = calloc(sizeof(NODE_OBJECT_T), 1);
#      |                                                     ^~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_io.c:584:53: note: earlier argument should specify number of elements, later size of each element
#  582|               return_if_error(r, "Out of memory");
#  583|   
#  584|->             NODE_OBJECT_T *file_obj = calloc(sizeof(NODE_OBJECT_T), 1);
#  585|               if (!file_obj) {
#  586|                   LOG_ERROR("Out of memory.");

Error: COMPILER_WARNING: [#def99]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policy_callbacks.c: scope_hint: In function ‘search_policy’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policy_callbacks.c:1135:39: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
# 1135 |         policy_object = calloc(sizeof(struct POLICY_LIST), 1);
#      |                                       ^~~~~~
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policy_callbacks.c:1135:39: note: earlier argument should specify number of elements, later size of each element
# 1133|           }
# 1134|           /* Extend linked list.*/
# 1135|->         policy_object = calloc(sizeof(struct POLICY_LIST), 1);
# 1136|           return_if_null(policy_object, "Out of memory.", TSS2_FAPI_RC_MEMORY);
# 1137|   

Error: CPPCHECK_WARNING (CWE-476): [#def100]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policy_execute.c:108: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: policy->policyAuthorizations
#  106|               malloc((n + 1) * sizeof(TPMS_POLICYAUTHORIZATION)
#  107|                      + sizeof(TPML_POLICYAUTHORIZATIONS));
#  108|->         return_if_null(policy->policyAuthorizations->authorizations,
#  109|                          "Out of memory.", TSS2_FAPI_RC_MEMORY);
#  110|   

Error: CPPCHECK_WARNING (CWE-476): [#def101]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policy_execute.c:121: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: policy->policyAuthorizations
#  119|           policy->policyAuthorizations = malloc(sizeof(TPMS_POLICYAUTHORIZATION)
#  120|                                                  + sizeof(TPML_POLICYAUTHORIZATIONS));
#  121|->         return_if_null(policy->policyAuthorizations->authorizations,
#  122|                          "Out of memory.", TSS2_FAPI_RC_MEMORY);
#  123|   

Error: CPPCHECK_WARNING (CWE-476): [#def102]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policy_execute.c:124: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: policy->policyAuthorizations
#  122|                          "Out of memory.", TSS2_FAPI_RC_MEMORY);
#  123|   
#  124|->         policy->policyAuthorizations->count = 1;
#  125|           policy->policyAuthorizations->authorizations[0] = *authorization;
#  126|       }

Error: COMPILER_WARNING: [#def103]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c: scope_hint: In function ‘new_policy’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:45:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#   45 |     *current_policy = calloc(sizeof(IFAPI_POLICYUTIL_STACK), 1);
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:45:37: note: earlier argument should specify number of elements, later size of each element
#   43|       IFAPI_POLICY_EXEC_CB_CTX *pol_exec_cb_ctx;
#   44|   
#   45|->     *current_policy = calloc(sizeof(IFAPI_POLICYUTIL_STACK), 1);
#   46|       if (!*current_policy) {
#   47|           return_error(TSS2_FAPI_RC_MEMORY, "Out of memory");

Error: COMPILER_WARNING: [#def104]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:50:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#   50 |     pol_exec_ctx = calloc(sizeof(IFAPI_POLICY_EXEC_CTX), 1);
#      |                                  ^~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:50:34: note: earlier argument should specify number of elements, later size of each element
#   48|       }
#   49|   
#   50|->     pol_exec_ctx = calloc(sizeof(IFAPI_POLICY_EXEC_CTX), 1);
#   51|       if (!pol_exec_ctx) {
#   52|           SAFE_FREE(*current_policy);

Error: COMPILER_WARNING: [#def105]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:76:37: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#   76 |     pol_exec_cb_ctx = calloc(sizeof(IFAPI_POLICY_EXEC_CB_CTX), 1);
#      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:76:37: note: earlier argument should specify number of elements, later size of each element
#   74|       pol_exec_ctx->callbacks.cbaction_userdata = context;
#   75|   
#   76|->     pol_exec_cb_ctx = calloc(sizeof(IFAPI_POLICY_EXEC_CB_CTX), 1);
#   77|       if (!pol_exec_cb_ctx) {
#   78|           SAFE_FREE(*current_policy);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:79:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pol_exec_ctx’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:46:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:50:20: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:50:20: acquire_memory: allocated here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:51:8: branch_false: following ‘false’ branch (when ‘pol_exec_ctx’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:55:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:77:8: branch_true: following ‘true’ branch (when ‘pol_exec_cb_ctx’ is NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:78:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_policyutil_execute.c:79:9: danger: ‘pol_exec_ctx’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   77|       if (!pol_exec_cb_ctx) {
#   78|           SAFE_FREE(*current_policy);
#   79|->         return_error(TSS2_FAPI_RC_MEMORY, "Out of memory");
#   80|       }
#   81|       pol_exec_ctx->app_data = pol_exec_cb_ctx;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:94:13: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(*<unknown>, (long unsigned int)(ext - *_17))’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:67:5: branch_false: following ‘false’ branch (when ‘profiles’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:68:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:68:5: branch_false: following ‘false’ branch (when ‘profilesdir’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:70:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:73:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:75:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:76:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:78:26: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:79:5: branch_false: following ‘false’ branch...
 branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:84:17: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:85:28: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:87:12: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:92:42: acquire_memory: allocated here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:94:13: danger: ‘strndup(*<unknown>, (long unsigned int)(ext - *_17))’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
#   92|               profiles->profiles[i].name = strndup(profiles->filenames[i],
#   93|                                                    ext - profiles->filenames[i]);
#   94|->             check_oom(profiles->profiles[i].name);
#   95|               /* Expand the filename with the directory */
#   96|               tmp = profiles->filenames[i];

Error: GCC_ANALYZER_WARNING (CWE-762): [#def108]
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:122:26: warning[-Wanalyzer-mismatching-deallocation]: ‘*profiles.profiles’ should have been deallocated with ‘free’ but was deallocated with ‘reallocarray’
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:67:5: branch_false: following ‘false’ branch (when ‘profiles’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:68:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:68:5: branch_false: following ‘false’ branch (when ‘profilesdir’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:70:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:73:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:75:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:76:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:78:26: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:78:26: acquire_memory: allocated here (expects deallocation with ‘free’)
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:79:5: branch_false: following ‘false’ branch...
 branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:84:17: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:116:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:116:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:122:39: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/ifapi_profiles.c:122:26: danger: deallocated with ‘reallocarray’ here; allocation at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8) expects deallocation with ‘free’
#  120|       }
#  121|   #ifdef HAVE_REALLOCARRAY
#  122|->     profiles->profiles = reallocarray(profiles->profiles, profiles->num_profiles,
#  123|                                         sizeof(profiles->profiles[0]));
#  124|       profiles->filenames = reallocarray(profiles->filenames, profiles->num_profiles,

Error: GCC_ANALYZER_WARNING (CWE-688): [#def109]
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:1272:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4705:1: enter_function: entry to ‘ifapi_json_TPMS_CREATION_DATA_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4711:5: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4713:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4715:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4719:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4719:9: call_function: calling ‘ifapi_json_TPML_PCR_SELECTION_deserialize’ from ‘ifapi_json_TPMS_CREATION_DATA_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4719:9: return_function: returning to ‘ifapi_json_TPMS_CREATION_DATA_deserialize’ from ‘ifapi_json_TPML_PCR_SELECTION_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4720:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4722:10: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4722:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4726:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4726:9: call_function: calling ‘ifapi_json_TPM2B_DIGEST_deserialize’ from ‘ifapi_json_TPMS_CREATION_DATA_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4726:9: return_function: returning to ‘ifapi_json_TPMS_CREATION_DATA_deserialize’ from ‘ifapi_json_TPM2B_DIGEST_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4727:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4729:10: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4729:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4733:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4733:9: call_function: calling ‘ifapi_json_TPMA_LOCALITY_deserialize’ from ‘ifapi_json_TPMS_CREATION_DATA_deserialize’
# 1270|                                       "TPM_", "TPM2_", "TPMA_", "LOCALITY_",
# 1271|                                       "TPM2_", "LOC_", NULL);
# 1272|->             if (strcasecmp(token, "extended") == 0) {
# 1273|                   int64_t i64;
# 1274|                   if (!get_number(json_object_get_string(val), &i64)) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def110]
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4531:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4455:1: enter_function: entry to ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4495:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4528:15: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4528:15: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4529:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4529:9: branch_true: following ‘true’ branch (when ‘entrykey’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4529:9: call_function: inlined call to ‘lh_entry_k’ from ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4530:33: call_function: calling ‘strip_prefix’ from ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4530:33: return_function: returning to ‘ifapi_json_TPMA_NV_deserialize’ from ‘strip_prefix’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4531:17: danger: argument 1 (‘strip_prefix(*entrykey.k, "TPM_", "TPM2_", "TPMA_", "NV_", "TPM2_", 0)’) NULL where non-null expected
# 4529|           json_object_object_foreach(jso, key, val) {
# 4530|               const char *token = strip_prefix(key, "TPM_", "TPM2_", "TPMA_", "NV_", "TPM2_", NULL);
# 4531|->             if (strcasecmp(token, "NT") == 0) {
# 4532|                   TPM2_NT out2;
# 4533|                   TSS2_RC r = ifapi_json_TPM2_NT_deserialize(val, &out2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def111]
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4542:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4455:1: enter_function: entry to ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4495:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4528:15: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4528:15: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4529:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4529:9: branch_true: following ‘true’ branch (when ‘entrykey’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4529:9: call_function: inlined call to ‘lh_entry_k’ from ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4530:33: call_function: calling ‘strip_prefix’ from ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4530:33: return_function: returning to ‘ifapi_json_TPMA_NV_deserialize’ from ‘strip_prefix’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4531:16: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4538:21: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4538:21: call_function: calling ‘strip_prefix’ from ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4538:21: return_function: returning to ‘ifapi_json_TPMA_NV_deserialize’ from ‘strip_prefix’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4539:17: call_function: calling ‘get_boolean_from_json’ from ‘ifapi_json_TPMA_NV_deserialize’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4539:17: return_function: returning to ‘ifapi_json_TPMA_NV_deserialize’ from ‘get_boolean_from_json’
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4540:13: branch_false: following ‘false’ branch...
 branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4541:25: branch_true: following ‘true’ branch (when ‘j != 27’)...
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4542:32: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-fapi/tpm_json_deserialize.c:4542:21: danger: argument 2 (‘strip_prefix(strip_prefix(*entrykey.k, "TPM_", "TPM2_", "TPMA_", "NV_", "TPM2_", 0), "NT_", 0)’) NULL where non-null expected
# 4540|               return_if_error2(r, "Boolean value expected at key: %s", key);
# 4541|               for (j = 0; j < n; j++) {
# 4542|->                 if (strcasecmp(tab[j].name, token) == 0) {
# 4543|                       if (flag)
# 4544|                           *out |= tab[j].in;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def112]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:184:5: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘*pipefd’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:272:12: enter_function: entry to ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:280:14: call_function: inlined call to ‘tcti_cmd_pipe’ from ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:281:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:287:10: call_function: inlined call to ‘tcti_cmd_pipe’ from ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:288:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:294:10: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:295:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:300:12: call_function: inlined call to ‘tcti_cmd_fork’ from ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:301:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:304:15: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:304:15: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:318:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:318:5: release_resource: first ‘close’ here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:318:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:319:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:319:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:325:13: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:326:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:327:14: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:360:5: call_function: calling ‘pipe_close’ from ‘popen_w_pipes’
#  182|   {
#  183|       int rc = errno;
#  184|->     close (pipefd[0]);
#  185|       close (pipefd[1]);
#  186|       errno = rc;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def113]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:185:5: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘pipefd[1]’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:272:12: enter_function: entry to ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:280:14: call_function: inlined call to ‘tcti_cmd_pipe’ from ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:281:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:287:10: call_function: inlined call to ‘tcti_cmd_pipe’ from ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:288:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:294:10: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:295:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:300:12: call_function: inlined call to ‘tcti_cmd_fork’ from ‘popen_w_pipes’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:301:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:304:15: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:304:15: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:318:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:318:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:319:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:319:5: release_resource: first ‘close’ here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:319:5: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:325:13: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:326:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:327:14: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:358:5: call_function: calling ‘pipe_close’ from ‘popen_w_pipes’
#  183|       int rc = errno;
#  184|       close (pipefd[0]);
#  185|->     close (pipefd[1]);
#  186|       errno = rc;
#  187|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def114]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:411:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tcti_ctx’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:399:9: enter_function: entry to ‘tcti_cmd_transmit’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:403:45: call_function: calling ‘tcti_cmd_down_cast’ from ‘tcti_cmd_transmit’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:403:45: return_function: returning to ‘tcti_cmd_transmit’ from ‘tcti_cmd_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:407:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:411:20: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:411:20: danger: dereference of NULL ‘tcti_cmd_context_cast(tcti_ctx)’
#  409|       }
#  410|   
#  411|->     size_t bytes = tcti_cmd_fwrite (cmd_buf, 1, size, tcti_cmd->sink);
#  412|       if (tcti_cmd_ferror (tcti_cmd->sink) || bytes != size) {
#  413|           LOG_ERROR ("Transmitting to subprocess failed: %s", strerror (errno));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def115]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:502:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tctiContext’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:465:9: enter_function: entry to ‘tcti_cmd_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:473:45: call_function: calling ‘tcti_cmd_down_cast’ from ‘tcti_cmd_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:473:45: return_function: returning to ‘tcti_cmd_receive’ from ‘tcti_cmd_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:478:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:482:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:496:8: branch_false: following ‘false’ branch (when ‘response_buffer’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:502:19: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-cmd.c:502:19: danger: dereference of NULL ‘tcti_cmd_context_cast(tctiContext)’
#  500|   
#  501|       /* block until we have a header or the child closes the pipe */
#  502|->     size_t size = tcti_cmd_fread (response_buffer, 1, TPM_HEADER_SIZE, tcti_cmd->source);
#  503|       rc = tcti_cmd_ferror (tcti_cmd->source);
#  504|       if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def116]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:118:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tctiContext’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:98:1: enter_function: entry to ‘tcti_device_transmit’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:104:45: call_function: calling ‘tcti_device_down_cast’ from ‘tcti_device_transmit’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:104:45: return_function: returning to ‘tcti_device_transmit’ from ‘tcti_device_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:111:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:114:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:118:12: danger: dereference of NULL ‘tcti_device_context_cast(tctiContext)’
#  116|                      "sending %zu byte command buffer:",
#  117|                      command_size);
#  118|->     size = write_all (tcti_dev->fd,
#  119|                         command_buffer,
#  120|                         command_size);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def117]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:177:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:153:1: enter_function: entry to ‘tcti_device_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:160:45: call_function: calling ‘tcti_device_down_cast’ from ‘tcti_device_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:160:45: return_function: returning to ‘tcti_device_receive’ from ‘tcti_device_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:172:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:176:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:176:8: branch_true: following ‘true’ branch (when ‘response_buffer’ is NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:177:14: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:177:14: danger: dereference of NULL ‘tcti_device_down_cast(tcti_device_context_cast(tctiContext))’
#  175|   
#  176|       if (!response_buffer) {
#  177|->         if (!tcti_common->partial_read_supported) {
#  178|               LOG_DEBUG("Partial read not supported ");
#  179|               *response_size = 4096;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def118]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:232:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:153:1: enter_function: entry to ‘tcti_device_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:160:45: call_function: calling ‘tcti_device_down_cast’ from ‘tcti_device_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:160:45: return_function: returning to ‘tcti_device_receive’ from ‘tcti_device_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:172:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:176:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:176:8: branch_false: following ‘false’ branch (when ‘response_buffer’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:232:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:232:9: danger: dereference of NULL ‘tcti_device_down_cast(tcti_device_context_cast(tctiContext))’
#  230|        * and return.
#  231|        */
#  232|->     if (tcti_common->partial == true && *response_size == TPM_HEADER_SIZE) {
#  233|           memcpy(response_buffer, &tcti_common->header, TPM_HEADER_SIZE);
#  234|           tcti_common->partial = false;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def119]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:392:16: warning[-Wanalyzer-null-argument]: use of NULL ‘used_conf’ where non-null expected
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:397:1: enter_function: entry to ‘Tss2_Tcti_Device_Init’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:406:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:408:15: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:408:15: branch_false: following ‘false’ branch (when ‘tctiContext’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:414:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:424:19: call_function: calling ‘tcti_device_down_cast’ from ‘Tss2_Tcti_Device_Init’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:424:19: return_function: returning to ‘Tss2_Tcti_Device_Init’ from ‘tcti_device_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:430:8: branch_true: following ‘true’ branch (when ‘conf’ is NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:431:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:433:28: branch_true: following ‘true’ branch (when ‘i != 3’)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:434:13: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:437:16: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:443:17: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:447:12: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:464:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:471:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:476:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:481:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:486:16: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:500:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:505:19: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:517:9: call_function: calling ‘close_tpm’ from ‘Tss2_Tcti_Device_Init’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:517:9: return_function: returning to ‘Tss2_Tcti_Device_Init’ from ‘close_tpm’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:518:24: call_function: inlined call to ‘open_tpm’ from ‘Tss2_Tcti_Device_Init’
#  390|           return open (pathname, O_RDWR | O_NONBLOCK, (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
#  391|   #else
#  392|->         return open (pathname, O_RDWR | O_NONBLOCK);
#  393|   #endif
#  394|   }

Error: COMPILER_WARNING: [#def120]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c: scope_hint: In function ‘Tss2_Tcti_Device_Init’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-device.c:465:23: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (13 chars into 12 available)
#  465 |     uint8_t cmd[12] = { "\x80\x01\x00\x00\x00\x0c\x00\x00\x01\x7b\x00\x08" };
#      |                       ^
#  463|       /* probe if the device support partial response read */
#  464|       LOG_DEBUG ("Probe device for partial response read support");
#  465|->     uint8_t cmd[12] = { "\x80\x01\x00\x00\x00\x0c\x00\x00\x01\x7b\x00\x08" };
#  466|       uint8_t rsp[20] = {0};
#  467|       struct pollfd fds;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def121]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:170:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:153:1: enter_function: entry to ‘send_sim_cmd_setup’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:157:45: call_function: calling ‘tcti_mssim_down_cast’ from ‘send_sim_cmd_setup’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:157:45: return_function: returning to ‘send_sim_cmd_setup’ from ‘tcti_mssim_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:166:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:170:33: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:170:33: danger: dereference of NULL ‘tcti_mssim_down_cast(tcti_mssim)’
#  168|       }
#  169|   
#  170|->     rc = Tss2_MU_UINT8_Marshal (tcti_common->locality,
#  171|                                   buf,
#  172|                                   sizeof (buf),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def122]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:264:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:251:1: enter_function: entry to ‘tcti_mssim_set_locality’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:256:45: call_function: calling ‘tcti_mssim_down_cast’ from ‘tcti_mssim_set_locality’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:256:45: return_function: returning to ‘tcti_mssim_set_locality’ from ‘tcti_mssim_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:260:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:264:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:264:5: danger: dereference of NULL ‘tcti_mssim_down_cast(tcti_mssim_context_cast(tctiContext))’
#  262|       }
#  263|   
#  264|->     tcti_common->locality = locality;
#  265|       return TSS2_RC_SUCCESS;
#  266|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def123]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:358:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tctiContext’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:318:1: enter_function: entry to ‘tcti_mssim_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:329:45: call_function: calling ‘tcti_mssim_down_cast’ from ‘tcti_mssim_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:329:45: return_function: returning to ‘tcti_mssim_receive’ from ‘tcti_mssim_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:337:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:354:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:354:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:358:15: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:358:15: danger: dereference of NULL ‘tcti_mssim_context_cast(tctiContext)’
#  356|           uint8_t size_buf [sizeof (UINT32)];
#  357|   
#  358|->         ret = socket_poll(tcti_mssim->tpm_sock, timeout);
#  359|           if (ret != TSS2_RC_SUCCESS) {
#  360|               if (ret == TSS2_TCTI_RC_TRY_AGAIN) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def124]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:398:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tctiContext’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:318:1: enter_function: entry to ‘tcti_mssim_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:329:45: call_function: calling ‘tcti_mssim_down_cast’ from ‘tcti_mssim_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:329:45: return_function: returning to ‘tcti_mssim_receive’ from ‘tcti_mssim_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:337:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:354:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:354:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:384:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:384:8: branch_false: following ‘false’ branch (when ‘response_buffer’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:389:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:389:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:394:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-mssim.c:398:11: danger: dereference of NULL ‘tcti_mssim_context_cast(tctiContext)’
#  396|       /* Receive the TPM response. */
#  397|       LOG_DEBUG ("Reading response of size %" PRIu32, tcti_common->header.size);
#  398|->     ret = socket_poll(tcti_mssim->tpm_sock, timeout);
#  399|       if (ret != TSS2_RC_SUCCESS) {
#  400|           if (ret == TSS2_TCTI_RC_TRY_AGAIN) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:184:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:171:8: branch_false: following ‘false’ branch (when ‘tcti_context’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:176:40: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:177:8: branch_false: following ‘false’ branch (when ‘platform_data’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:181:25: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:181:25: acquire_resource: opened here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:182:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:183:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-spidev.c:184:9: danger: leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  182|       if (!platform_data->fd) {
#  183|           LOG_ERROR("%s cannot be opened: %s", config, strerror(errno));
#  184|->         free(platform_data);
#  185|           return TSS2_TCTI_RC_IO_ERROR;
#  186|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def126]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:299:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tcti_ctx’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:259:1: enter_function: entry to ‘tcti_swtpm_transmit’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:265:45: call_function: calling ‘tcti_swtpm_down_cast’ from ‘tcti_swtpm_transmit’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:265:45: return_function: returning to ‘tcti_swtpm_transmit’ from ‘tcti_swtpm_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:270:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:273:10: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:274:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:277:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:277:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:283:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:295:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:299:10: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:299:10: danger: dereference of NULL ‘tcti_swtpm_context_cast(tcti_ctx)’
#  297|       }
#  298|   
#  299|->     rc = socket_xmit_buf (tcti_swtpm->tpm_sock, cmd_buf, size);
#  300|       if (rc != TSS2_RC_SUCCESS) {
#  301|           return rc;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def127]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:418:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tctiContext’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:380:1: enter_function: entry to ‘tcti_swtpm_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:392:45: call_function: calling ‘tcti_swtpm_down_cast’ from ‘tcti_swtpm_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:392:45: return_function: returning to ‘tcti_swtpm_receive’ from ‘tcti_swtpm_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:397:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:401:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:415:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:416:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:418:15: danger: dereference of NULL ‘tcti_swtpm_context_cast(tctiContext)’
#  416|           LOG_DEBUG("Receiving header to determine the size of the response.");
#  417|           uint8_t res_header[10];
#  418|->         ret = socket_recv_buf (tcti_swtpm->tpm_sock, &res_header[0], 10);
#  419|           if (ret != 10) {
#  420|               rc = TSS2_TCTI_RC_IO_ERROR;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:446:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tctiContext’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:380:1: enter_function: entry to ‘tcti_swtpm_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:392:45: call_function: calling ‘tcti_swtpm_down_cast’ from ‘tcti_swtpm_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:392:45: return_function: returning to ‘tcti_swtpm_receive’ from ‘tcti_swtpm_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:397:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:401:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:415:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:433:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:433:8: branch_false: following ‘false’ branch (when ‘response_buffer’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:438:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:438:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:442:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:444:8: branch_true: following ‘true’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:445:9: branch_true: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:446:15: danger: dereference of NULL ‘tcti_swtpm_context_cast(tctiContext)’
#  444|       if (tcti_common->header.size > 10) {
#  445|           LOG_DEBUG ("Reading response of size %" PRIu32, tcti_common->header.size);
#  446|->         ret = socket_recv_buf (tcti_swtpm->tpm_sock,
#  447|                                  (unsigned char *)&response_buffer[10],
#  448|                                  tcti_common->header.size - 10);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def129]
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:472:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:380:1: enter_function: entry to ‘tcti_swtpm_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:392:45: call_function: calling ‘tcti_swtpm_down_cast’ from ‘tcti_swtpm_receive’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:392:45: return_function: returning to ‘tcti_swtpm_receive’ from ‘tcti_swtpm_down_cast’
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:397:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:401:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:415:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:433:8: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:433:8: branch_false: following ‘false’ branch (when ‘response_buffer’ is non-NULL)...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:438:9: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:438:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:442:5: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:444:8: branch_false: following ‘false’ branch...
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:455:26: branch_false: ...to here
tpm2-tss-4.1.3/src/tss2-tcti/tcti-swtpm.c:472:5: danger: dereference of NULL ‘tcti_swtpm_down_cast(tcti_swtpm_context_cast(tctiContext))’
#  470|   
#  471|       tcti_common->header.size = 0;
#  472|->     tcti_common->state = TCTI_STATE_TRANSMIT;
#  473|   
#  474|       return rc;

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-88.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nametpm2-tss-4.1.3-7.fc43
store-results-to/tmp/tmpve9u3ju6/tpm2-tss-4.1.3-7.fc43.tar.xz
time-created2025-04-25 15:51:36
time-finished2025-04-25 15:54:39
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpve9u3ju6/tpm2-tss-4.1.3-7.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpve9u3ju6/tpm2-tss-4.1.3-7.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9