From 7b39215c8a0842fff38f8edb2b8ee67038eb96c5 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 4 Aug 2021 22:16:29 -0400 Subject: [PATCH] hex_util: Fix incorrect array size in AsArray Although this isn't used, this is a potential bug as HexStringToArray will perform an out-of-bounds read. --- src/common/hex_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/hex_util.h b/src/common/hex_util.h index f5f9e4507..5e9b6ef8b 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -61,7 +61,7 @@ template return out; } -[[nodiscard]] constexpr std::array AsArray(const char (&data)[17]) { +[[nodiscard]] constexpr std::array AsArray(const char (&data)[33]) { return HexStringToArray<16>(data); }