VirtualBox

Ignore:
Timestamp:
Mar 26, 2008 3:22:35 PM (17 years ago)
Author:
vboxsync
Message:

Fix error handling memory leak. And change incorrect macro naming.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r7576 r7580  
    3939/** Maximum encoded string size (including NUL) we allow for VMDK images.
    4040 * Deliberately not set high to avoid running out of descriptor space. */
    41 #define VMDK_ENCRYPTED_COMMENT_MAX 1024
     41#define VMDK_ENCODED_COMMENT_MAX 1024
    4242
    4343/** VMDK descriptor DDB entry for PCHS cylinders. */
     
    460460    else
    461461    {
     462        RTStrFree((char *)(void *)pVmdkFile->pszFilename);
    462463        RTMemFree(pVmdkFile);
    463464        *pFile = NIL_RTFILE;
     
    545546static char *vmdkEncodeString(const char *psz)
    546547{
    547     char szEnc[VMDK_ENCRYPTED_COMMENT_MAX + 3];
     548    char szEnc[VMDK_ENCODED_COMMENT_MAX + 3];
    548549    char *pszDst = szEnc;
    549550
     
    571572        else
    572573            pszDst = RTStrPutCp(pszDst, Cp);
    573         if (pszDst - szEnc >= VMDK_ENCRYPTED_COMMENT_MAX - 1)
     574        if (pszDst - szEnc >= VMDK_ENCODED_COMMENT_MAX - 1)
    574575        {
    575576            pszDst = pszDstPrev;
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