about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-01-04 00:57:02 +0000
committerJames Booth <boothj5@gmail.com>2013-01-04 00:57:02 +0000
commitd2e957166263466a5225c0bdbc46a3dc8a6a3bf5 (patch)
tree719bb37e6b9559bf32aa0a7de1ede1aa90f37b69
parent516ba1662703a3d313f89b9a7df3689773c5dde7 (diff)
downloadprofani-tty-d2e957166263466a5225c0bdbc46a3dc8a6a3bf5.tar.gz
Fix buffer overflow check
-rw-r--r--src/input_win.c2
1 files changed, 1 insertions, 1 deletions
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);