VirtualBox

Ignore:
Timestamp:
Dec 29, 2017 4:52:03 PM (7 years ago)
Author:
vboxsync
Message:

VBoxGuestR3LibGuestCtrl.cpp: Fixed some size assertions in VbglR3HGCMCall.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp

    r69500 r70389  
    480480    VbglHGCMParmUInt32Set(&Msg.flags, 0);
    481481
    482     int rc = VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     482    int rc = VbglR3HGCMCall(&Msg.hdr, RT_UOFFSETOF(HGCMMsgProcOutput, data));
    483483    if (RT_SUCCESS(rc))
    484484    {
     
    852852    VbglHGCMParmUInt32Set(&Msg.u.open.handle, uFileHandle);
    853853
    854     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     854    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSET_AFTER(HGCMReplyFileNotify, u.open));
    855855}
    856856
     
    867867    VbglHGCMParmUInt32Set(&Msg.rc, uRc);
    868868
    869     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     869    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSETOF(HGCMReplyFileNotify, u));
    870870}
    871871
     
    881881    VbglHGCMParmUInt32Set(&Msg.rc, uRc);
    882882
    883     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     883    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSETOF(HGCMReplyFileNotify, u));
    884884}
    885885
     
    898898    VbglHGCMParmPtrSet(&Msg.u.read.data, pvData, cbData);
    899899
    900     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     900    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSET_AFTER(HGCMReplyFileNotify, u.read));
    901901}
    902902
     
    914914    VbglHGCMParmUInt32Set(&Msg.u.write.written, uWritten);
    915915
    916     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     916    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSET_AFTER(HGCMReplyFileNotify, u.write));
    917917}
    918918
     
    930930    VbglHGCMParmUInt64Set(&Msg.u.seek.offset, uOffActual);
    931931
    932     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     932    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSET_AFTER(HGCMReplyFileNotify, u.seek));
    933933}
    934934
     
    946946    VbglHGCMParmUInt64Set(&Msg.u.tell.offset, uOffActual);
    947947
    948     return VbglR3HGCMCall(&Msg.hdr, sizeof(Msg));
     948    return VbglR3HGCMCall(&Msg.hdr, RT_UOFFSET_AFTER(HGCMReplyFileNotify, u.tell));
    949949}
    950950
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