| commit | 58711741a40f11d4f1419a127d8336aa0438f8e8 | [log] [tgz] |
|---|---|---|
| author | Eric Pouech <eric.pouech@wanadoo.fr> | Wed Feb 19 23:27:49 2003 +0000 |
| committer | Alexandre Julliard <julliard@winehq.org> | Wed Feb 19 23:27:49 2003 +0000 |
| tree | de6aa7a1bd3da5fade513399420698691d04a7f8 | |
| parent | a969416c562ac5c6eeaeb59a7c53646032b57927 [diff] [blame] |
Fixed read-overflow spotted by valgrind.
diff --git a/server/console.c b/server/console.c index a907227..330daac 100644 --- a/server/console.c +++ b/server/console.c
@@ -612,7 +612,7 @@ 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;