apps/speed.c: fix compiler warnings in multiblock_speed().
authorAndy Polyakov <appro@openssl.org>
Mon, 7 Jul 2014 15:02:26 +0000 (17:02 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 7 Jul 2014 15:03:27 +0000 (17:03 +0200)
(cherry picked from commit c4f8efab34af95a5319bbc5b954b62614604298a)

apps/speed.c

index 53d6bc58bde7cac096306ba97e5513c16ceab15c..f7aba131fedae00bbee20ab6cc814efea85b9b7d 100644 (file)
@@ -2884,14 +2884,15 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
                for (count=0,run=1; run && count<0x7fffffff; count++)
                        {
                        unsigned char aad[13];
-                       EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM mb_param = {NULL,aad,sizeof(aad),0};
+                       EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM mb_param;
                        size_t len = mblengths[j];
                        int packlen;
 
-                       aad[8] = 23;
-                       aad[9] = 3;
+                       memset(aad,0,8);/* avoid uninitialized values */
+                       aad[8] = 23;    /* SSL3_RT_APPLICATION_DATA */
+                       aad[9] = 3;     /* version */
                        aad[10] = 2;
-                       aad[11] = 0;
+                       aad[11] = 0;    /* length */
                        aad[12] = 0;
                        mb_param.out = NULL;
                        mb_param.inp = aad;