VirtualBox

Ignore:
Timestamp:
Oct 26, 2010 12:27:50 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67055
Message:

*: Fixes for incorrect RTStrAPrintf usage (it does NOT return an IPRT status code) and the odd bugs nearby.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/tar.cpp

    r33289 r33464  
    12981298
    12991299        uint64_t cbOverallWritten = 0;
    1300         for(size_t i=0; i < cFiles; ++i)
     1300        for (size_t i = 0; i < cFiles; ++i)
    13011301        {
    13021302            RTTARFILE hFile;
     
    13041304            if (RT_FAILURE(rc))
    13051305                break;
    1306             char *pszTargetFile;
    1307             rc = RTStrAPrintf(&pszTargetFile, "%s/%s", pszOutputDir, papszFiles[i]);
    1308             if (RT_FAILURE(rc))
    1309                 break;
     1306            char *pszTargetFile = RTPathJoinA(pszOutputDir, papszFiles[i]);
     1307            if (!pszTargetFile)
     1308            {
     1309                rc = VERR_NO_STR_MEMORY;
     1310                break;
     1311            }
    13101312            rc = rtTarExtractFileToFile(hFile, pszTargetFile, cbOverallSize, cbOverallWritten, pfnProgressCallback, pvUser);
    13111313            RTStrFree(pszTargetFile);
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