Changeset 05fb96b in mainline for uspace/srv/fs/mfs/mfs_dentry.c


Ignore:
Timestamp:
2011-09-10T10:58:51Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2f72c67a
Parents:
cccc091 (diff), 40a2af3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:mfs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_dentry.c

    rcccc091 r05fb96b  
    7676                d_info->d_inum = conv32(sbi->native, d3->d_inum);
    7777                memcpy(d_info->d_name, d3->d_name, MFS3_MAX_NAME_LEN);
     78                d_info->d_name[MFS3_MAX_NAME_LEN] = 0;
    7879        } else {
    7980                const int namelen = longnames ? MFS_L_MAX_NAME_LEN :
     
    8687                d_info->d_inum = conv16(sbi->native, d->d_inum);
    8788                memcpy(d_info->d_name, d->d_name, namelen);
     89                d_info->d_name[namelen] = 0;
    8890        }
    8991
     
    249251        d_info.d_inum = d_inum;
    250252        memcpy(d_info.d_name, d_name, name_len);
    251         d_info.d_name[name_len] = 0;
     253        if (name_len < sbi->max_name_len)
     254                d_info.d_name[name_len] = 0;
    252255
    253256        r = mfs_write_dentry(&d_info);
Note: See TracChangeset for help on using the changeset viewer.