Skip to content
Snippets Groups Projects
Commit 58711741 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard
Browse files

Fixed read-overflow spotted by valgrind.

parent a969416c
No related branches found
No related tags found
No related merge requests found
......@@ -612,7 +612,7 @@ static int set_console_input_info( const struct set_console_input_info_request *
WCHAR *new_title = mem_alloc( len + sizeof(WCHAR) );
if (new_title)
{
memcpy( new_title, title, len + sizeof(WCHAR) );
memcpy( new_title, title, len );
new_title[len / sizeof(WCHAR)] = 0;
if (console->title) free( console->title );
console->title = new_title;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment