nova: fix bootstrap bug

commandline_to_basename may adjust the pointer of the string, recalculate the
length accordingly.
This commit is contained in:
Alexander Boettcher 2013-04-23 11:52:45 +02:00 committed by Norman Feske
parent d1f40b86d9
commit ed825c1d46
1 changed files with 3 additions and 2 deletions

View File

@ -525,8 +525,9 @@ Platform::Platform() :
/* all behind rom module will be cleared, copy the command line */
char *name_tmp = commandline_to_basename(reinterpret_cast<char *>(aux));
name = new (core_mem_alloc()) char [aux_len];
memcpy(name, name_tmp, aux_len);
unsigned name_tmp_size = aux_len - (name_tmp - reinterpret_cast<char *>(aux));
name = new (core_mem_alloc()) char [name_tmp_size];
memcpy(name, name_tmp, name_tmp_size);
} else {