summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-16 15:34:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-16 15:34:33 +0200
commit39840438bb3c29a0b890745f490a350a84470b75 (patch)
tree9dcf5494723ea3e11c0cfa207cd83f7f2e7ef085
parent1ac0b083f84e4760331456e02928bfea97038e07 (diff)
downloadrtems-39840438bb3c29a0b890745f490a350a84470b75.tar.bz2
dosfs: Fix read from invalid memory area
-rw-r--r--cpukit/libfs/src/dosfs/msdos_conv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_conv.c b/cpukit/libfs/src/dosfs/msdos_conv.c
index 7e688ef3ce..b391717d07 100644
--- a/cpukit/libfs/src/dosfs/msdos_conv.c
+++ b/cpukit/libfs/src/dosfs/msdos_conv.c
@@ -631,7 +631,7 @@ msdos_filename_utf8_to_short_name_for_save (
* Strip any further characters up to a '.' or the end of the
* string.
*/
- if ( *name_ptr == '.' ) {
+ if ( name_size > 0 && *name_ptr == '.' ) {
++name_ptr;
--name_size;
}