From 06c013384372ff66537eab7e969ed67a16530a63 Mon Sep 17 00:00:00 2001
From: "Dmitriy A. Gerasimov" <dmitriy.gerasimov@demlabs.net>
Date: Thu, 26 Nov 2020 17:15:34 +0700
Subject: [PATCH] [*] Bugfix

---
 modules/global-db/dap_chain_global_db.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/global-db/dap_chain_global_db.c b/modules/global-db/dap_chain_global_db.c
index ffdd19273d..a10589da98 100644
--- a/modules/global-db/dap_chain_global_db.c
+++ b/modules/global-db/dap_chain_global_db.c
@@ -859,6 +859,8 @@ char* dap_chain_global_db_hash(const uint8_t *data, size_t data_size)
 void* dap_db_log_unpack(const void *a_data, size_t a_data_size, size_t *a_store_obj_count)
 {
     const dap_store_obj_pkt_t *l_pkt = (const dap_store_obj_pkt_t*) a_data;
+    if (! l_pkt)
+        return NULL;
     if(!l_pkt || l_pkt->data_size != ((size_t) a_data_size - sizeof(dap_store_obj_pkt_t)))
         return NULL;
     size_t l_store_obj_count = 0;
-- 
GitLab