added 1 changeset to branch 'refs/remotes/pdziepak-github/nfs4' old head: 2f44d34e5e696fe1fde8f4a8ee2728664984db04 new head: fa5d300d6b01032ece3f4d2dcf2391b6cc9a6ef1 ---------------------------------------------------------------------------- fa5d300: nfs4: Fix timespec attribute allocation size * copying the time attributes was fixed to copy the whole st_?tim timespec struct but the allocation size was still only that of st_?time subfield, which is only a time_t. Signed-off-by: FranÃois Revol <revol@xxxxxxx> Signed-off-by: Pawel Dziepak <pdziepak@xxxxxxxxxxx> [ FranÃois Revol <revol@xxxxxxx> ] ---------------------------------------------------------------------------- Commit: fa5d300d6b01032ece3f4d2dcf2391b6cc9a6ef1 Author: FranÃois Revol <revol@xxxxxxx> Date: Fri Aug 24 01:30:51 2012 UTC Committer: Pawel Dziepak <pdziepak@xxxxxxxxxxx> Commit-Date: Sat Nov 3 19:40:55 2012 UTC ---------------------------------------------------------------------------- 1 file changed, 4 insertions(+), 4 deletions(-) src/add-ons/kernel/file_systems/nfs4/Inode.cpp | 8 ++++---- ---------------------------------------------------------------------------- diff --git a/src/add-ons/kernel/file_systems/nfs4/Inode.cpp b/src/add-ons/kernel/file_systems/nfs4/Inode.cpp index f303dfd..31c519f 100644 --- a/src/add-ons/kernel/file_systems/nfs4/Inode.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/Inode.cpp @@ -628,16 +628,16 @@ Inode::WriteStat(const struct stat* st, uint32 mask, OpenAttrCookie* cookie) if ((mask & B_STAT_ACCESS_TIME) != 0) { attr[i].fAttribute = FATTR4_TIME_ACCESS_SET; attr[i].fFreePointer = true; - attr[i].fData.fPointer = malloc(sizeof(st->st_atime)); - memcpy(attr[i].fData.fPointer, &st->st_atime, sizeof(st->st_atim)); + attr[i].fData.fPointer = malloc(sizeof(st->st_atim)); + memcpy(attr[i].fData.fPointer, &st->st_atim, sizeof(st->st_atim)); i++; } if ((mask & B_STAT_MODIFICATION_TIME) != 0) { attr[i].fAttribute = FATTR4_TIME_MODIFY_SET; attr[i].fFreePointer = true; - attr[i].fData.fPointer = malloc(sizeof(st->st_mtime)); - memcpy(attr[i].fData.fPointer, &st->st_mtime, sizeof(st->st_mtim)); + attr[i].fData.fPointer = malloc(sizeof(st->st_mtim)); + memcpy(attr[i].fData.fPointer, &st->st_mtim, sizeof(st->st_mtim)); i++; }