VirtualBox

Changeset 19110 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Apr 22, 2009 1:35:31 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46287
Message:

Additions/Linux/vboxadd: empty R3 HGCM buffers should have a NULL address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r19091 r19110  
    442442
    443443    AssertPtrReturn(ppBuf, -EINVAL);
     444    /* Empty buffers are allowed, but then the user pointer should be NULL */
     445    AssertReturn(((cb > 0) && VALID_PTR(pUser)) || (pUser == NULL), -EINVAL);
    444446
    445447    pBuf = RTMemAlloc(sizeof(*pBuf));
     
    459461        }
    460462        else
    461             /* Empty buffers are allowed, but then the user pointer is not
    462              * required to be valid, and we definitely don't want to copy
    463              * anything. */
     463            /* We definitely don't want to copy anything from an empty
     464             * buffer. */
    464465            pKernel = NULL;
    465466    }
Note: See TracChangeset for help on using the changeset viewer.

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