Please Clang's sanitizer, addendum.
authorAndy Polyakov <appro@openssl.org>
Tue, 8 Jul 2014 21:06:59 +0000 (23:06 +0200)
committerAndy Polyakov <appro@openssl.org>
Wed, 9 Jul 2014 20:45:52 +0000 (22:45 +0200)
(cherry picked from commit d11c70b2c2a655d112fa72d34c6702e9aa2eff79)

crypto/engine/eng_table.c
crypto/objects/obj_dat.c

index 4fde9481852c0e47c7d2062182b72207db01cc21..22cddee40e18a352d2743aa72bd1456d7b325289 100644 (file)
@@ -346,6 +346,8 @@ void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
        ENGINE_PILE_DOALL dall;
        dall.cb = cb;
        dall.arg = arg;
-       lh_ENGINE_PILE_doall_arg(&table->piles, LHASH_DOALL_ARG_FN(int_cb),
-                                ENGINE_PILE_DOALL, &dall);
+       if (table)
+               lh_ENGINE_PILE_doall_arg(&table->piles,
+                               LHASH_DOALL_ARG_FN(int_cb),
+                               ENGINE_PILE_DOALL, &dall);
        }
index 8a342ba3eb3eb07eca1eb6fee5436e2355c1cf3f..2df14a7fbe66f4645b12ceccbb10c5fdee84b1fc 100644 (file)
@@ -140,7 +140,7 @@ static unsigned long added_obj_hash(const ADDED_OBJ *ca)
                return 0;
                }
        ret&=0x3fffffffL;
-       ret|=ca->type<<30L;
+       ret|=((unsigned long)ca->type)<<30L;
        return(ret);
        }
 static IMPLEMENT_LHASH_HASH_FN(added_obj, ADDED_OBJ)