aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-08-04 22:16:29 -0400
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-08-04 22:16:29 -0400
commit7b39215c8a0842fff38f8edb2b8ee67038eb96c5 (patch)
treed262849f58174f2d3a23546f2f51feb8e5bc3566 /src
parent2868d4ba84f43c9bf3c7b6997ddcafb6e65c4a02 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/common/hex_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/hex_util.h b/src/common/hex_util.h
index f5f9e45077..5e9b6ef8b5 100644
--- a/src/common/hex_util.h
+++ b/src/common/hex_util.h
@@ -61,7 +61,7 @@ template <typename ContiguousContainer>
return out;
}
-[[nodiscard]] constexpr std::array<u8, 16> AsArray(const char (&data)[17]) {
+[[nodiscard]] constexpr std::array<u8, 16> AsArray(const char (&data)[33]) {
return HexStringToArray<16>(data);
}