VirtualBox

Ignore:
Timestamp:
Jul 12, 2007 4:25:57 PM (17 years ago)
Author:
vboxsync
Message:

Wrong size checks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp

    r3157 r3590  
    577577            VMMDevRequestHeader *req = NULL;
    578578
    579             int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, vmmdevGetRequestSize(requestHeader->requestType), requestHeader->requestType);
     579            int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, requestHeader->size, requestHeader->requestType);
    580580
    581581            if (VBOX_SUCCESS(rc))
    582582            {
    583583                /* copy the request information */
    584                 memcpy((void*)req, (void*)pBuf, vmmdevGetRequestSize(requestHeader->requestType));
     584                memcpy((void*)req, (void*)pBuf, requestHeader->size);
    585585                rc = VbglGRPerform(req);
    586586
     
    594594                {
    595595                    /* copy result */
    596                     memcpy((void*)pBuf, (void*)req, vmmdevGetRequestSize(requestHeader->requestType));
    597                     cbOut = vmmdevGetRequestSize(requestHeader->requestType);
     596                    memcpy((void*)pBuf, (void*)req, requestHeader->size);
     597                    cbOut = requestHeader->size;
    598598                }
    599599
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