]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: Coverity Scans complain about uninitialized usage of struct. Setting s->ODD...
authoriceman1001 <iceman@iuse.se>
Wed, 20 Jan 2016 10:31:24 +0000 (11:31 +0100)
committericeman1001 <iceman@iuse.se>
Wed, 20 Jan 2016 10:31:24 +0000 (11:31 +0100)
armsrc/crypto1.c
client/cmdhfmfhard.c
client/nonce2key/crypto1.c
tools/mfkey/crypto1.c
tools/nonce2key/crypto1.c

index b218af19e0d14ce88afdee5af571ceddd96345dd..a212ecc4cc79ce45de6da4337b4ecf6ec04f9f32 100644 (file)
@@ -24,6 +24,7 @@
 void crypto1_create(struct Crypto1State *s, uint64_t key)
 {
 //     struct Crypto1State *s = malloc(sizeof(*s));
+       s->odd = s->even = 0;
        int i;
 
        for(i = 47;s && i > 0; i -= 2) {
index 95a6f8d7f04a6a8bf8f0d9b6708ff15d1721efdc..e2d6da74ebd7c042b113eda6333c99bff2e62913 100644 (file)
@@ -687,6 +687,7 @@ static void Check_for_FilterFlipProperties(void)
 static void simulate_MFplus_RNG(uint32_t test_cuid, uint64_t test_key, uint32_t *nt_enc, uint8_t *par_enc)
 {
        struct Crypto1State sim_cs;
+       sim_cs.odd = sim_cs.even = 0;
 
        // init cryptostate with key:
        for(int8_t i = 47; i > 0; i -= 2) {
index f6779a189415e37d3867d5e4816b5d1727882e32..e5a3fe73dc59ff2e8f53dee2d8a6273d2b8a6b96 100644 (file)
@@ -23,6 +23,7 @@
 struct Crypto1State * crypto1_create(uint64_t key)
 {
        struct Crypto1State *s = malloc(sizeof(*s));
+       s->odd = s->even = 0;   
        int i;
 
        for(i = 47;s && i > 0; i -= 2) {
index d15a40e31b02224884c21713bf98282e3888fc7d..57a6c1df9157ce5bed3653af91d9dec630d919c5 100755 (executable)
@@ -23,6 +23,7 @@
 struct Crypto1State * crypto1_create(uint64_t key)
 {
        struct Crypto1State *s = malloc(sizeof(*s));
+       s->odd = s->even = 0;   
        int i;
 
        for(i = 47;s && i > 0; i -= 2) {
index d15a40e31b02224884c21713bf98282e3888fc7d..57a6c1df9157ce5bed3653af91d9dec630d919c5 100644 (file)
@@ -23,6 +23,7 @@
 struct Crypto1State * crypto1_create(uint64_t key)
 {
        struct Crypto1State *s = malloc(sizeof(*s));
+       s->odd = s->even = 0;   
        int i;
 
        for(i = 47;s && i > 0; i -= 2) {
Impressum, Datenschutz