From 36a6c1aaf76e344afd13c1918ea842dd1c9b4987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Tue, 9 Jan 2024 19:50:40 +0100 Subject: [PATCH] Fix incorrect SHA256 logged in `dummy_map` tool The SHA256 was being calculated over a pointer to the map data and random following memory instead of over the data itself. --- src/tools/dummy_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/dummy_map.cpp b/src/tools/dummy_map.cpp index db2f76f53..8a8c92ced 100644 --- a/src/tools/dummy_map.cpp +++ b/src/tools/dummy_map.cpp @@ -90,7 +90,7 @@ void CreateEmptyMap(IStorage *pStorage) unsigned char *pDataChar = static_cast(pData); unsigned Crc = crc32(0, pDataChar, DataSize); - SHA256_DIGEST Sha256 = sha256(&pDataChar, DataSize); + SHA256_DIGEST Sha256 = sha256(pDataChar, DataSize); char aMapSha[SHA256_MAXSTRSIZE]; sha256_str(Sha256, aMapSha, sizeof(aMapSha));