From d2e957166263466a5225c0bdbc46a3dc8a6a3bf5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 4 Jan 2013 00:57:02 +0000 Subject: [PATCH] Fix buffer overflow check --- src/input_win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input_win.c b/src/input_win.c index 0d79fd5c..87ceb7f1 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -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);