diff --git a/tools/ecdsa_keygen.c b/tools/ecdsa_keygen.c index 2955fc60..6a4dd491 100644 --- a/tools/ecdsa_keygen.c +++ b/tools/ecdsa_keygen.c @@ -86,11 +86,11 @@ const uint32_t iv[] = /* All data definitions with global scope appear here. */ /* Public Function Prototypes */ -Message *message_init(int); -int aes256_init(Message *); -Message *aes256_encrypt(Message *); -void aes_cleanup(AES_DATA *); -void message_cleanup(Message *); +Message *message_init(int length); +int aes256_init(Message *input); +Message *aes256_encrypt(Message *plaintext); +void aes_cleanup(AES_DATA *aes_data); +void message_cleanup(Message *message); void sha256(unsigned char *data, unsigned int data_len, unsigned char *hash) { @@ -125,8 +125,8 @@ int aes256_init(Message * input) Message *aes256_encrypt(Message * plaintext) { - EVP_CIPHER_CTX *enc_ctx; - Message * encrypted_message; + EVP_CIPHER_CTX *enc_ctx = NULL; + Message * encrypted_message = NULL; int enc_length = *(plaintext->length) + (AES_BLOCK_SIZE - *(plaintext->length) % AES_BLOCK_SIZE); diff --git a/tools/fwinfogen.c b/tools/fwinfogen.c index d0bc3072..a47bbbb5 100644 --- a/tools/fwinfogen.c +++ b/tools/fwinfogen.c @@ -213,7 +213,8 @@ static int sign_pFwInfo(FW_INFO_T *pFwInfo, ECC_KEY_T *ecdsa_key) eckey) != 1) { printf("Failed to verify EC Signature\n"); } else { - BIGNUM *r, *s; + BIGNUM *r = NULL; + BIGNUM *s = NULL; #if OPENSSL_VERSION_NUMBER >= 0x10100000L ECDSA_SIG_get0(signature, &r, &s); #else @@ -333,7 +334,7 @@ int main(int argc, char** argv) { unsigned char *buf = NULL; int ret = -1; - FILE* fd; + FILE* fd = NULL; int img_size = 0; #ifdef CONFIG_BOOTLOADER2