From: Pasi Kallinen Date: Mon, 7 Dec 2015 16:31:51 +0000 (+0200) Subject: Fix a buffer overflow in ee X-Git-Tag: v1.6.1-roc-dev~57^2~1 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=4a619dc66e250d5e00557a1fb6ad07f2f45f76de;p=dgamelaunch Fix a buffer overflow in ee Original patch by Neil Moore --- diff --git a/ee.c b/ee.c index b26c913..08210fe 100644 --- a/ee.c +++ b/ee.c @@ -1968,7 +1968,7 @@ int *append; /* TRUE if must append more text to end of current line */ struct text *tline; /* temporary pointer to new line */ int first_time; /* if TRUE, the first time through the loop */ wchar_t in_string[MAX_FILE]; - length = mbstowcs(in_string, in_str, sizeof(in_string)); + length = mbstowcs(in_string, in_str, sizeof(in_string)/sizeof(wchar_t)); if (length == -1) { wmove(com_win, 0, 0);