Fixed read-overflow spotted by valgrind.
authorEric Pouech <eric.pouech@wanadoo.fr>
Wed, 19 Feb 2003 23:27:49 +0000 (23:27 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 19 Feb 2003 23:27:49 +0000 (23:27 +0000)
server/console.c

index a907227e46e7484ba5347c27bb782d4fc45f38ed..330daacd77eb9a6be62a64a7d189257d1fee730e 100644 (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) );
         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;