From d11c70b2c2a655d112fa72d34c6702e9aa2eff79 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 8 Jul 2014 23:06:59 +0200 Subject: [PATCH] Please Clang's sanitizer, addendum. --- crypto/engine/eng_table.c | 6 ++++-- crypto/objects/obj_dat.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/engine/eng_table.c b/crypto/engine/eng_table.c index 93dc90ec3c..74e1adf258 100644 --- a/crypto/engine/eng_table.c +++ b/crypto/engine/eng_table.c @@ -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); } diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 959ad65d99..e515160d72 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -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) -- 2.25.1