Ticket #1775: nfs_patch.diff

File nfs_patch.diff, 1004 bytes (added by kevin.kirspel, on Apr 1, 2011 at 12:05:56 PM)

Adds a check for nfsStBlksize on the buffer size for nfs_file_read() and nfs_file_write(). Corrects usage of nfs_evalpath_arg in nfs_do_evalpath().

  • cpukit/libfs/src/nfsclient/src/nfs.c

    diff -rupN rtems/cpukit/libfs/src/nfsclient/src/nfs.c rtems-4.10/cpukit/libfs/src/nfsclient/src/nfs.c
    old new  
    15741575                 */
    15751576                assert( node->args.name );
    15761577
    1577                 *(const char**)arg = pathname + (node->args.name - p);
     1578                *(arg->c) = pathname + (node->args.name - p);
    15781579
    15791580#if 0
    15801581                /* restore the directory node */
     
    26162617        if (count > NFS_MAXDATA)
    26172618                count = NFS_MAXDATA;
    26182619
     2620        if (count > nfsStBlksize)
     2621                count = nfsStBlksize;
     2622
    26192623        SERP_ARGS(node).readarg.offset          = iop->offset;
    26202624        SERP_ARGS(node).readarg.count           = count;
    26212625        SERP_ARGS(node).readarg.totalcount      = UINT32_C(0xdeadbeef);
     
    27202724        if (count > NFS_MAXDATA)
    27212725                count = NFS_MAXDATA;
    27222726
     2727        if (count > nfsStBlksize)
     2728                count = nfsStBlksize;
    27232729
    27242730        SERP_ARGS(node).writearg.beginoffset   = UINT32_C(0xdeadbeef);
    27252731        if ( LIBIO_FLAGS_APPEND & iop->flags ) {