Project

General

Profile

Actions

Bug #5591

closed

initialisation inversion of component order in cmd-crypto/elfsign.c

Added by Richard PALO over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-02-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

KMF_DATA is defined thus:

typedef struct kmf_data
{
    size_t    Length; /* in bytes */
    uchar_t    *Data;
} KMF_DATA;

therefore, the following patch fixes the initialisation order of the components:

diff --git a/usr/src/cmd/cmd-crypto/elfsign/elfsign.c b/usr/src/cmd/cmd-crypto/e
index 45ae510..b11da36 100644
--- a/usr/src/cmd/cmd-crypto/elfsign/elfsign.c
+++ b/usr/src/cmd/cmd-crypto/elfsign/elfsign.c
@@ -736,7 +736,7 @@ create_csr(char *dn)
        KMF_X509_NAME csrSubject;
        KMF_CSR_DATA csr;
        KMF_ALGORITHM_INDEX sigAlg = KMF_ALGID_MD5WithRSA;
-       KMF_DATA signedCsr = { NULL, 0 };
+       KMF_DATA signedCsr = { 0, NULL };
        char *err;
        KMF_ATTRIBUTE   attrlist[16];
        KMF_ENCODE_FORMAT       format;

Actions

Also available in: Atom PDF