VirtualBox

Changeset 52680 in vbox


Ignore:
Timestamp:
Sep 10, 2014 3:24:02 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96006
Message:

SUP: Put a hard size limit on the startup log.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp

    r52632 r52680  
    154154static int              g_hStartupLog = -1;
    155155#endif
     156/** The number of bytes we've written to the startup log. */
     157static uint32_t volatile g_cbStartupLog = 0;
    156158
    157159/** The current SUPR3HardenedMain state / location. */
     
    994996{
    995997#ifdef RT_OS_WINDOWS
    996     if (g_hStartupLog)
     998    if (   g_hStartupLog != NULL
     999        && g_cbStartupLog < 128*_1M)
    9971000    {
    9981001        char szBuf[5120];
     
    10061009        if (!cch || szBuf[cch - 1] != '\n')
    10071010            szBuf[cch++] = '\n';
     1011
     1012        ASMAtomicAddU32(&g_cbStartupLog, (uint32_t)cch);
    10081013
    10091014        IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette