diff options
author | Mai M <mathew1800@gmail.com> | 2021-10-15 17:04:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 17:04:44 -0400 |
commit | 764369f4c7ac60f6a985f613bee4a02a20afb88d (patch) | |
tree | 2333d6f81aba1757e5a88778e35ca8dc1239de36 /src/common/string_util.h | |
parent | d5c4af2d5b7f8d32f9845b424d73ec9c090c3465 (diff) | |
parent | 0d6057b2fa98f08a461edaf584e9ac75f7fdecde (diff) |
Merge pull request #7172 from Morph1984/out-of-bounds
string_util: Prevent out of bounds access in u16string_view buffer
Diffstat (limited to 'src/common/string_util.h')
-rw-r--r-- | src/common/string_util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h index 7e90a9ca5..f0dd632ee 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -63,7 +63,7 @@ template <typename InIt> * Creates a std::string from a fixed-size NUL-terminated char buffer. If the buffer isn't * NUL-terminated then the string ends at max_len characters. */ -[[nodiscard]] std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, +[[nodiscard]] std::string StringFromFixedZeroTerminatedBuffer(std::string_view buffer, std::size_t max_len); /** |