瀏覽代碼

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.
Morph 5 年之前
父節點
當前提交
7b39215c8a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/hex_util.h

+ 1 - 1
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);
 }