From 58711741a40f11d4f1419a127d8336aa0438f8e8 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 19 Feb 2003 23:27:49 +0000 Subject: [PATCH] Fixed read-overflow spotted by valgrind. --- server/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/console.c b/server/console.c index a907227e46e..330daacd77e 100644 --- a/server/console.c +++ b/server/console.c @@ -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;