VirtualBox

Changeset 23753 in vbox


Ignore:
Timestamp:
Oct 14, 2009 10:15:42 AM (15 years ago)
Author:
vboxsync
Message:

SSM: Missing input checks (using ssmR3DataWrite/Read now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/SSM.cpp

    r23752 r23753  
    31533153VMMR3DECL(int) SSMR3PutStruct(PSSMHANDLE pSSM, const void *pvStruct, PCSSMFIELD paFields)
    31543154{
     3155    SSM_ASSERT_WRITEABLE_RET(pSSM);
     3156    SSM_CHECK_CANCELLED_RET(pSSM);
     3157    AssertPtr(pvStruct);
     3158    AssertPtr(paFields);
     3159
    31553160    /* begin marker. */
    31563161    int rc = SSMR3PutU32(pSSM, SSMR3STRUCT_BEGIN);
     
    32143219     * Validation.
    32153220     */
     3221    SSM_ASSERT_WRITEABLE_RET(pSSM);
     3222    SSM_CHECK_CANCELLED_RET(pSSM);
    32163223    AssertMsgReturn(!(fFlags & ~SSMSTRUCT_FLAGS_VALID_MASK), ("%#x\n", fFlags), VERR_INVALID_PARAMETER);
    32173224    AssertPtr(pvStruct);
     
    56415648VMMR3DECL(int) SSMR3GetStruct(PSSMHANDLE pSSM, void *pvStruct, PCSSMFIELD paFields)
    56425649{
     5650    SSM_ASSERT_READABLE_RET(pSSM);
     5651    SSM_CHECK_CANCELLED_RET(pSSM);
     5652    AssertPtr(pvStruct);
     5653    AssertPtr(paFields);
     5654
    56435655    /* begin marker. */
    56445656    uint32_t u32Magic;
     
    57085720     * Validation.
    57095721     */
     5722    SSM_ASSERT_READABLE_RET(pSSM);
     5723    SSM_CHECK_CANCELLED_RET(pSSM);
    57105724    AssertMsgReturn(!(fFlags & ~SSMSTRUCT_FLAGS_VALID_MASK), ("%#x\n", fFlags), VERR_INVALID_PARAMETER);
    57115725    AssertPtr(pvStruct);
    57125726    AssertPtr(paFields);
    5713 
    57145727
    57155728    /*
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