VirtualBox

Ignore:
Timestamp:
Jul 14, 2021 11:55:28 PM (4 years ago)
Author:
vboxsync
Message:

DevVGA: Addendum to bugref:9904

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r90021 r90200  
    38573857     * Get bitmap header data
    38583858     */
     3859    PCLOGOHDR        pLogoHdr = (PCLOGOHDR)pThisCC->pbLogo;
    38593860    PBMPFILEHDR      pFileHdr = (PBMPFILEHDR)(pThisCC->pbLogo + sizeof(LOGOHDR));
    38603861    PBMPWIN3XINFOHDR pCoreHdr = (PBMPWIN3XINFOHDR)(pThisCC->pbLogo + sizeof(LOGOHDR) + sizeof(BMPFILEHDR));
     
    39203921
    39213922        AssertLogRelMsgReturn(pThisCC->LogoCompression == BMP_COMPRESSION_TYPE_NONE,
    3922                                ("Unsupported %u compression.\n", pThisCC->LogoCompression),
    3923                                VERR_INVALID_PARAMETER);
    3924 
    3925         AssertLogRelMsgReturn(pFileHdr->cbFileSize > pFileHdr->offBits,
    3926                                ("Wrong bitmap data offset %u.\n", pFileHdr->offBits),
    3927                                VERR_INVALID_PARAMETER);
    3928 
    3929         uint32_t const cbFileData  = pFileHdr->cbFileSize - pFileHdr->offBits;
     3923                              ("Unsupported %u compression.\n", pThisCC->LogoCompression),
     3924                              VERR_INVALID_PARAMETER);
     3925
     3926        AssertLogRelMsgReturn(pLogoHdr->cbLogo > pFileHdr->offBits,
     3927                              ("Wrong bitmap data offset %u, cbLogo=%u.\n", pFileHdr->offBits, pLogoHdr->cbLogo),
     3928                              VERR_INVALID_PARAMETER);
     3929
     3930        uint32_t const cbFileData  = pLogoHdr->cbLogo - pFileHdr->offBits;
    39303931        uint32_t       cbImageData = (uint32_t)pThisCC->cxLogo * pThisCC->cyLogo * pThisCC->cLogoPlanes;
    39313932        if (pThisCC->cLogoBits == 4)
     
    39343935            cbImageData *= 3;
    39353936        AssertLogRelMsgReturn(cbImageData <= cbFileData,
    3936                               ("Wrong BMP header data %u\n", cbImageData),
     3937                              ("Wrong BMP header data %u (cbLogo=%u offBits=%u)\n", cbImageData, pFileHdr->offBits, pLogoHdr->cbLogo),
     3938                              VERR_INVALID_PARAMETER);
     3939
     3940        AssertLogRelMsgReturn(pLogoHdr->cbLogo == pFileHdr->cbFileSize,
     3941                              ("Wrong bitmap file size %u, cbLogo=%u.\n", pFileHdr->cbFileSize, pLogoHdr->cbLogo),
    39373942                              VERR_INVALID_PARAMETER);
    39383943
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