VirtualBox

Changeset 6314 in vbox


Ignore:
Timestamp:
Jan 9, 2008 11:53:00 PM (17 years ago)
Author:
vboxsync
Message:

Fix segmentation fault because of a NULL pointer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r6295 r6314  
    803803                            RTPathStripExt(pPluginDirEntry->szName);
    804804                            char *pszFormat = NULL;
    805                             AssertBreak(strlen(pszFormat) >= VBOX_HDDFORMAT_PLUGIN_PREFIX_LENGTH,
    806                                         rc = VERR_INVALID_NAME);
     805
    807806                            pszFormat = RTStrDup(pPluginDirEntry->szName + VBOX_HDDFORMAT_PLUGIN_PREFIX_LENGTH);
    808807                            if (!pszFormat)
    809808                                rc = VERR_NO_MEMORY;
     809
     810                            AssertBreak(strlen(pszFormat) >= VBOX_HDDFORMAT_PLUGIN_PREFIX_LENGTH,
     811                                        rc = VERR_INVALID_NAME);
    810812                            *ppszFormat = pszFormat;
    811813                        }
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