Fixed read-overflow spotted by valgrind.

This commit is contained in:
Eric Pouech 2003-02-19 23:27:49 +00:00 committed by Alexandre Julliard
parent a969416c56
commit 58711741a4
1 changed files with 1 additions and 1 deletions

View File

@ -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) ); WCHAR *new_title = mem_alloc( len + sizeof(WCHAR) );
if (new_title) if (new_title)
{ {
memcpy( new_title, title, len + sizeof(WCHAR) ); memcpy( new_title, title, len );
new_title[len / sizeof(WCHAR)] = 0; new_title[len / sizeof(WCHAR)] = 0;
if (console->title) free( console->title ); if (console->title) free( console->title );
console->title = new_title; console->title = new_title;