VirtualBox

Changeset 25414 in vbox for trunk/src/VBox/Main/HostImpl.cpp


Ignore:
Timestamp:
Dec 15, 2009 4:27:45 PM (15 years ago)
Author:
vboxsync
Message:

Main/HostImpl-solaris: fix another unchecked strdup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r25412 r25414  
    427427                char *cdromEnv = strdup(RTEnvGet("VBOX_CDROM"));
    428428                char *saveStr = NULL;
    429                 char *cdromDrive;
    430                 cdromDrive = strtok_r(cdromEnv, ":", &saveStr);
     429                char *cdromDrive = NULL;
     430                if (cdromEnv)
     431                    cdromDrive = strtok_r(cdromEnv, ":", &saveStr);
    431432                while (cdromDrive)
    432433                {
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