Skip to content

Commit

Permalink
libobs: Fix buffer overrun in os_wcs_to_utf8()
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod authored and Lain-B committed Aug 6, 2024
1 parent e36352d commit 95a753b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libobs/util/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ size_t os_wcs_to_utf8(const wchar_t *str, size_t len, char *dst,
return 0;

if (out_len)
out_len =
wchar_to_utf8(str, in_len, dst, out_len + 1, 0);
out_len = wchar_to_utf8(str, in_len, dst, out_len, 0);

dst[out_len] = 0;
}
Expand Down

0 comments on commit 95a753b

Please sign in to comment.