Skip to content

Commit

Permalink
prevent overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Kaluza committed Sep 25, 2024
1 parent 26b5618 commit 0a057dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrapasvst3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void utf8_to_utf16l(const char* utf8string, uint16_t* target, size_t targetsize)

auto src = reinterpret_cast<const uint8_t*>(utf8string);
size_t pos = 0;
while (src[pos] && (targetpos < (targetsize - 1)))
while (src[pos] && (targetpos < (targetsize - 2)))
{
auto byte = src[pos];

Expand Down

0 comments on commit 0a057dc

Please sign in to comment.