VirtualBox

Changeset 103441 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Feb 19, 2024 1:47:22 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161772
Message:

IPRT/tstRTR0CommonDriver.h: Unconfuse the szPath code, it can overflow. bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTR0CommonDriver.h

    r103440 r103441  
    116116    }
    117117
    118     char szPath[RTPATH_MAX + sizeof(".r0")];
    119     rc = RTPathExecDir(szPath, RTPATH_MAX);
     118    char szPath[RTPATH_MAX];
     119    rc = RTPathExecDir(szPath, sizeof(szPath));
    120120    if (RT_SUCCESS(rc))
    121         rc = RTPathAppend(szPath, RTPATH_MAX, pszTestServiceName);
     121        rc = RTPathAppend(szPath, sizeof(szPath), pszTestServiceName);
    122122    if (RT_SUCCESS(rc))
    123123        rc = RTStrCat(szPath, sizeof(szPath), ".r0");
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