From fb3ef957bbb6d674f7482572443a678e6b4a612e Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Fri, 2 Feb 2024 12:33:42 -0600 Subject: service: fs: Skip non user id folders --- src/common/hex_util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common') diff --git a/src/common/hex_util.h b/src/common/hex_util.h index a00904939..618f53152 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -9,6 +9,7 @@ #include #include #include +#include "common/assert.h" #include "common/common_types.h" namespace Common { @@ -29,6 +30,8 @@ namespace Common { template [[nodiscard]] constexpr std::array HexStringToArray(std::string_view str) { + ASSERT_MSG(Size * 2 <= str.size(), "Invalid string size"); + std::array out{}; if constexpr (le) { for (std::size_t i = 2 * Size - 2; i <= 2 * Size; i -= 2) { -- cgit v1.2.3