Skip to content

Commit 95a753b

Browse files
derrodLain-B
authored andcommitted
libobs: Fix buffer overrun in os_wcs_to_utf8()
1 parent e36352d commit 95a753b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

libobs/util/platform.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,7 @@ size_t os_wcs_to_utf8(const wchar_t *str, size_t len, char *dst,
429429
return 0;
430430

431431
if (out_len)
432-
out_len =
433-
wchar_to_utf8(str, in_len, dst, out_len + 1, 0);
432+
out_len = wchar_to_utf8(str, in_len, dst, out_len, 0);
434433

435434
dst[out_len] = 0;
436435
}

0 commit comments

Comments
 (0)