examples/fips_validation: fix unitialized variables
authorMarko Kovacevic <marko.kovacevic@intel.com>
Tue, 6 Nov 2018 10:28:34 +0000 (10:28 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 6 Nov 2018 11:13:49 +0000 (12:13 +0100)
Fixed compilation issue with variable which may
be used uninitialized.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
examples/fips_validation/main.c

index 85f54cb..e7559c6 100644 (file)
@@ -887,9 +887,9 @@ fips_mct_tdes_test(void)
 #define TDES_EXTERN_ITER       400
 #define TDES_INTERN_ITER       10000
        struct fips_val val, val_key;
-       uint8_t prev_out[TDES_BLOCK_SIZE];
-       uint8_t prev_prev_out[TDES_BLOCK_SIZE];
-       uint8_t prev_in[TDES_BLOCK_SIZE];
+       uint8_t prev_out[TDES_BLOCK_SIZE] = {0};
+       uint8_t prev_prev_out[TDES_BLOCK_SIZE] = {0};
+       uint8_t prev_in[TDES_BLOCK_SIZE] = {0};
        uint32_t i, j, k;
        int ret;