Ticket #2292: 0001-dosfs-avoid-buffer-overread.-closes-2292.patch

File 0001-dosfs-avoid-buffer-overread.-closes-2292.patch, 990 bytes (added by Gedare Bloom, on Mar 10, 2015 at 1:55:27 PM)

Fix.

  • cpukit/libfs/src/dosfs/msdos_misc.c

    From 57da44a3356c49208de1d023fa79236f23d42abc Mon Sep 17 00:00:00 2001
    From: Gedare Bloom <gedare@rtems.org>
    Date: Tue, 10 Mar 2015 09:54:30 -0400
    Subject: [PATCH] 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 b msdos_get_utf16_string_from_long_entry ( 
    10551055
    10561056        if (is_first_entry) {
    10571057            for (chars_in_entry = 0;
    1058                  (    entry_string_buf[chars_in_entry] != 0x0000
    1059                   && chars_in_entry < MSDOS_LFN_LEN_PER_ENTRY );
     1058                 (   chars_in_entry < MSDOS_LFN_LEN_PER_ENTRY
     1059                  && entry_string_buf[chars_in_entry] != 0x0000);
    10601060                  ++chars_in_entry) {
    10611061                ;
    10621062            }