diff options
author | Gedare Bloom <gedare@rtems.org> | 2015-03-10 09:54:30 -0400 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2015-05-27 11:21:12 -0400 |
commit | 92422be16c3f3e835fca9b09e9b15e91714d522b (patch) | |
tree | b30627ca3100d8cb72210df10a00b42fc71a05aa | |
parent | libtests/i2c01: Avoid stack overflow (diff) | |
download | rtems-92422be16c3f3e835fca9b09e9b15e91714d522b.tar.bz2 |
dosfs: avoid buffer-overread. closes #2292.
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c index fdac613c72..76dff439a9 100644 --- a/cpukit/libfs/src/dosfs/msdos_misc.c +++ b/cpukit/libfs/src/dosfs/msdos_misc.c @@ -1055,8 +1055,8 @@ msdos_get_utf16_string_from_long_entry ( if (is_first_entry) { for (chars_in_entry = 0; - ( entry_string_buf[chars_in_entry] != 0x0000 - && chars_in_entry < MSDOS_LFN_LEN_PER_ENTRY ); + ( chars_in_entry < MSDOS_LFN_LEN_PER_ENTRY + && entry_string_buf[chars_in_entry] != 0x0000); ++chars_in_entry) { ; } |