Commit 13eba405 authored by Pierre Ynard's avatar Pierre Ynard

ncurses: fix buffer overflow when typing in the edit box

parent ec33767a
......@@ -1570,8 +1570,8 @@ static void HandleEditBoxKey(intf_thread_t *p_intf, int key, int box)
break;
default:
if (len + 1 < search ? sizeof p_sys->psz_search_chain
: sizeof p_sys->psz_open_chain)
if (len + 1 < (search ? sizeof p_sys->psz_search_chain
: sizeof p_sys->psz_open_chain))
{
str[len + 0] = (char) key;
str[len + 1] = '\0';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment