mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Fix buffer overflow check
This commit is contained in:
parent
516ba16627
commit
d2e9571662
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user