VirtualBox

Ignore:
Timestamp:
Jun 16, 2020 8:03:06 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138673
Message:

Validation Kit/TXS: Fixed a bug in txsReplaceStringVariables() where unsupported string variables like $FOO will lead to an infinite loop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp

    r84794 r84855  
    553553    char   *pszNew    = RTStrDup(pszSrc);
    554554    char   *pszDollar = pszNew;
    555     while ((pszDollar = strchr(pszDollar, '$')) != NULL)
    556     {
    557         /** @todo employ $$ as escape sequence here. */
     555    while (pszDollar && (pszDollar = strchr(pszDollar, '$')) != NULL)
     556    {
    558557        if (pszDollar[1] == '{')
    559558        {
     
    639638            cchNew -= 1;
    640639        }
     640        else /* No match, move to next char to avoid endless looping. */
     641            pszDollar++;
    641642    }
    642643
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