diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 1fa4293bb0..d0103b28aa 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -22,6 +22,11 @@ * rtems/Makefile.am: Remove the stray 'c' file. +2010-06-22 Sebastian Huber + + * libcsupport/src/mount.c: Fixed string assignment in mount entry + allocation. + 2010-06-21 Joel Sherrill PR 1581/cpukit diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index c73ce89e35..b4f3fd4d5e 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -111,18 +111,18 @@ static rtems_filesystem_mount_table_entry_t *alloc_mount_table_entry( if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); - mt_entry->type = str; strcpy( str, filesystemtype ); + mt_entry->type = str; + str += filesystemtype_size; if ( source_or_null != NULL ) { - str += filesystemtype_size; - mt_entry->dev = str; strcpy( str, source_or_null ); + mt_entry->dev = str; + str += source_size; } - str += source_size; - mt_entry->target = str; strcpy( str, target ); + mt_entry->target = str; } *target_length_ptr = target_length;