VirtualBox

Ignore:
Timestamp:
Jun 5, 2009 8:08:52 AM (16 years ago)
Author:
vboxsync
Message:

Linux shared folders: properly initialize the whole params !VBoxCall() structure including the attributes

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/dirops.c

    r13837 r20298  
    4343        }
    4444
     45        memset(&params, 0, sizeof(params));
     46
    4547        sf_d = sf_dir_info_alloc ();
    4648
     
    406408                dentry->d_name.name);
    407409#endif
     410
     411        memset(&params, 0, sizeof(params));
    408412
    409413        params.CreateFlags = 0
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r16466 r20298  
    210210        BUG_ON (!sf_i);
    211211
     212        LogFunc(("open %s\n", sf_i->path->String.utf8));
     213
    212214        sf_r = kmalloc (sizeof (*sf_r), GFP_KERNEL);
    213215        if (!sf_r) {
     
    216218        }
    217219
    218         LogFunc(("open %s\n", sf_i->path->String.utf8));
    219 
    220         params.CreateFlags = 0;
    221         params.Info.cbObject = 0;
    222         /* We check this afterwards to find out if the call succeeded
    223            or failed, as the API does not seem to cleanly distinguish
    224            error and informational messages. */
    225         params.Handle = 0;
     220        memset(&params, 0, sizeof(params));
     221        /* params.Handle is now 0. We check this afterwards to find out if
     222         * the call succeeded or failed, as the API does not seem to cleanly
     223         * distinguish error and informational messages. */
    226224
    227225        if (file->f_flags & O_CREAT) {
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r15819 r20298  
    153153
    154154        TRACE ();
     155
     156        memset(&params, 0, sizeof(params));
    155157        params.CreateFlags = SHFL_CF_LOOKUP | SHFL_CF_ACT_FAIL_IF_NEW;
    156158        LogFunc(("calling vboxCallCreate, file %s, flags %#x\n",
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette