VirtualBox

Changeset 3049 in vbox for trunk/src/libs/xpcom18a4/xpcom


Ignore:
Timestamp:
Jun 5, 2007 12:27:22 PM (18 years ago)
Author:
vboxsync
Message:

fixed another putenv problem found by valgrind

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/glue/standalone/nsXPCOMGlue.cpp

    r960 r3049  
    425425{
    426426  const char* grePath = GRE_GetGREPath();
     427  char szPath[MAXPATHLEN];
    427428  if (!grePath)
    428429    return;
    429430
    430431  const char* path = PR_GetEnv(XPCOM_SEARCH_KEY);
    431   if (!path) {
     432  if (!path)
    432433    path = "";
     434#ifdef VBOX
     435  else
     436  {
     437      /* sEnvString is part of the environment because of putenv().
     438       * path is only temporarily used and not argument of putenv() itself */
     439      snprintf(szPath, sizeof(szPath), "%s", path);
     440      path = szPath;
    433441  }
     442#endif
    434443
    435444  if (spEnvString) PR_smprintf_free(spEnvString);
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