Please Clang's sanitizer, addendum.
authorAndy Polyakov <appro@openssl.org>
Tue, 8 Jul 2014 21:06:59 +0000 (23:06 +0200)
committerEmilia Kasper <emilia@openssl.org>
Thu, 16 Apr 2015 16:29:49 +0000 (18:29 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/engine/eng_table.c
crypto/objects/obj_dat.c

index 2e1a7e855ae22a7a090e3186a5a56fe64c3d25ec..27d31f70c855440ab30984bdb0b9702335eb3d93 100644 (file)
@@ -351,6 +351,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 e42a1c147de8e8bfd9fc2834e244ea4762b226ae..5cd755d77d63bd83cb51131f55956127d4064472 100644 (file)
@@ -142,7 +142,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);
 }