VirtualBox

Changeset 10626 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jul 15, 2008 7:38:26 AM (17 years ago)
Author:
vboxsync
Message:

Windows guest logging R3: Bugfix for const-modifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp

    r10606 r10626  
    2424*   Header Files                                                               *
    2525*******************************************************************************/
     26#include <iprt/mem.h>
    2627#include <VBox/log.h>
    2728
     
    5859     * Handle the entire request in one go.
    5960     */
    60     return vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cb), (char *)pch, cb);
     61    if (!pch || !cb)
     62        return VINF_SUCCESS;
     63
     64    void *pvTmp = RTMemDup(pch, cb);
     65    if (!pvTmp)
     66        return VERR_NO_MEMORY;
     67    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cb), pvTmp, cb);
     68    RTMemFree(pvTmp);
     69    return rc;
    6170
    6271#else
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