[rtems commit] dosfs: avoid buffer-overread. closes #2292.
Gedare Bloom
gedare at rtems.org
Wed May 27 15:22:47 UTC 2015
Module: rtems
Branch: master
Commit: 92422be16c3f3e835fca9b09e9b15e91714d522b
Changeset: http://git.rtems.org/rtems/commit/?id=92422be16c3f3e835fca9b09e9b15e91714d522b
Author: Gedare Bloom <gedare at rtems.org>
Date: Tue Mar 10 09:54:30 2015 -0400
dosfs: avoid buffer-overread. closes #2292.
---
cpukit/libfs/src/dosfs/msdos_misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index fdac613..76dff43 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) {
;
}
More information about the vc
mailing list