summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/mount.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-09 16:02:02 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-13 09:38:03 +0100
commit3c1d387523b99986baf004c8621513f3fb05cb96 (patch)
tree5362de5a879e4559c419cd321d057bcb341f8d3d /cpukit/libcsupport/src/mount.c
parentdosfs: Lazy update of FAT32 FS info sector (diff)
downloadrtems-3c1d387523b99986baf004c8621513f3fb05cb96.tar.bz2
Filesystem: Preserve source NULL pointer in mount
Diffstat (limited to 'cpukit/libcsupport/src/mount.c')
-rw-r--r--cpukit/libcsupport/src/mount.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
index a6c43215ef..8eb4796fb2 100644
--- a/cpukit/libcsupport/src/mount.c
+++ b/cpukit/libcsupport/src/mount.c
@@ -10,7 +10,7 @@
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2010 embedded brains GmbH.
+ * Copyright (c) 2010-2012 embedded brains GmbH.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -73,9 +73,11 @@ static rtems_filesystem_mount_table_entry_t *alloc_mount_table_entry(
mt_entry->type = str;
str += filesystemtype_size;
- memcpy( str, source_or_null, source_size );
- mt_entry->dev = str;
- str += source_size;
+ if ( source_or_null != NULL ) {
+ memcpy( str, source_or_null, source_size );
+ mt_entry->dev = str;
+ str += source_size;
+ }
memcpy( str, target, target_size );
mt_entry->target = str;