Browse Source

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.
nce_cpp
Morph 4 years ago
parent
commit
8f488c60da
  1. 2
      src/common/hex_util.h

2
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);
}

Loading…
Cancel
Save