VirtualBox

Changeset 48292 in vbox


Ignore:
Timestamp:
Sep 5, 2013 7:27:54 AM (11 years ago)
Author:
vboxsync
Message:

crOpenGL: dumper fixes

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_dump.h

    r46515 r48292  
    3232RT_C_DECLS_BEGIN
    3333
     34#ifdef RT_OS_WINDOWS
    3435DECLEXPORT(void) crDmpDumpImgDmlBreak(struct CR_DUMPER * pDumper, CR_BLITTER_IMG *pImg, const char*pszEntryDesc);
    3536
    3637DECLEXPORT(void) crDmpDumpStrDbgPrint(struct CR_DUMPER * pDumper, const char*pszStr);
     38#endif
    3739
    3840struct CR_DUMPER;
     
    5456            (_pDumper)->pfnDumpStr((_pDumper), (_pDesc)); \
    5557        } while (0)
     58
     59#ifndef RT_OS_WINDOWS
     60# define vsprintf_s vsnprintf
     61# define sprintf_s snprintf
     62#endif
    5663
    5764DECLINLINE(void) crDmpStrV(CR_DUMPER *pDumper, const char *pszStr, va_list pArgList)
     
    105112DECLEXPORT(int) crDmpHtmlInit(struct CR_HTML_DUMPER * pDumper, const char *pszDir, const char *pszFile);
    106113
     114#ifdef RT_OS_WINDOWS
    107115DECLINLINE(void) crDmpDbgPrintInit(CR_DBGPRINT_DUMPER *pDumper)
    108116{
     
    110118    pDumper->Base.pfnDumpStr = crDmpDumpStrDbgPrint;
    111119}
     120#endif
    112121
    113122typedef struct CR_RECORDER
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/dump.cpp

    r46515 r48292  
    555555    *pNewLine = '\0';
    556556    *pcbStr = cbStr - (((uintptr_t)pNewLine) - ((uintptr_t)pszStr)) - 1;
    557     Assert((*pcbStr) >= 0);
     557    Assert((*pcbStr) < UINT32_MAX/2);
    558558    Assert((*pcbStr) < cbStr);
    559559    *ppszStr = pNewLine + 1;
     
    14211421}
    14221422
     1423#ifdef RT_OS_WINDOWS
    14231424static void crDmpPrint(const char* szString, ...)
    14241425{
     
    14541455    OutputDebugStringA(pszStr);
    14551456}
     1457#endif
    14561458
    14571459static void crDmpHtmlDumpStrExact(struct CR_HTML_DUMPER * pDumper, const char *pszStr)
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