1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fix buffer overflow check

This commit is contained in:
James Booth 2013-01-04 00:57:02 +00:00
parent 516ba16627
commit d2e9571662

View File

@ -169,7 +169,7 @@ inp_get_char(char *input, int *size)
// handle insert if not at end of input
if (inp_x < display_size) {
char bytes[5];
char bytes[MB_CUR_MAX];
size_t utf_len = wcrtomb(bytes, ch, NULL);
char *next_ch = g_utf8_offset_to_pointer(input, inp_x);