Noted by VS2013, const values should be initialized (though I think
the 'static' should also implicitly zero).
This also removes some unused code that also contained uninitialized
static consts.
ok?
Index: evp/e_chacha20poly1305.c
===
RCS file: /cvs/src/lib/libssl/src/crypto/evp/e_chacha20poly1305.c,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 e_chacha20poly1305.c
--- evp/e_chacha20poly1305.c28 Apr 2016 16:06:53 - 1.14
+++ evp/e_chacha20poly1305.c11 Jul 2016 13:10:31 -
@@ -109,7 +109,7 @@ static void
poly1305_update_with_pad16(poly1305_state *poly1305,
const unsigned char *data, size_t data_len)
{
- static const unsigned char zero_pad16[16];
+ static const unsigned char zero_pad16[16] = {0};
size_t pad_len;
CRYPTO_poly1305_update(poly1305, data, data_len);
Index: objects/obj_dat.c
===
RCS file: /cvs/src/lib/libssl/src/crypto/objects/obj_dat.c,v
retrieving revision 1.35
diff -u -p -u -p -r1.35 obj_dat.c
--- objects/obj_dat.c 14 Oct 2015 21:54:10 - 1.35
+++ objects/obj_dat.c 11 Jul 2016 13:10:31 -
@@ -70,20 +70,7 @@
#include
/* obj_dat.h is generated from objects.h by obj_dat.pl */
-#ifndef OPENSSL_NO_OBJECT
#include "obj_dat.h"
-#else
-/* You will have to load all the objects needed manually in the application */
-#define NUM_NID 0
-#define NUM_SN 0
-#define NUM_LN 0
-#define NUM_OBJ 0
-static const unsigned char lvalues[1];
-static const ASN1_OBJECT nid_objs[1];
-static const unsigned int sn_objs[1];
-static const unsigned int ln_objs[1];
-static const unsigned int obj_objs[1];
-#endif
DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn);
DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln);