diff options
Diffstat (limited to 'c/enc/hash.h')
-rw-r--r-- | c/enc/hash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/c/enc/hash.h b/c/enc/hash.h index 60fb5df..6362f69 100644 --- a/c/enc/hash.h +++ b/c/enc/hash.h @@ -426,7 +426,7 @@ static BROTLI_INLINE void HasherSetup(MemoryManager* m, Hasher* hasher, ChooseHasher(params, ¶ms->hasher); alloc_size = HasherSize(params, one_shot, input_size); hasher->common.extra = BROTLI_ALLOC(m, uint8_t, alloc_size); - if (BROTLI_IS_OOM(m)) return; + if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(hasher->common.extra)) return; hasher->common.params = params->hasher; switch (hasher->common.params.type) { #define INITIALIZE_(N) \ |