r=timeless, src=roc
Patch from Ganesh - check for empty string before dereferencing pointer


git-svn-id: svn://10.0.0.236/trunk@193813 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2006-04-07 15:44:53 +00:00
parent 1130da4c5a
commit 132a659843

View File

@@ -232,8 +232,11 @@ static void LoadExtraSharedLibs()
arrayOfLibs[i][PL_strlen(arrayOfLibs[i])] = ':'; //restore ":" in sonameList
}
}
for (p = &sonameListToSave[PL_strlen(sonameListToSave) - 1]; *p == ':'; p--)
*p = 0; //delete tail ":" delimiters
// Check whether sonameListToSave is a empty String, Bug: 329205
if (sonameListToSave[0])
for (p = &sonameListToSave[PL_strlen(sonameListToSave) - 1]; *p == ':'; p--)
*p = 0; //delete tail ":" delimiters
if (!prefSonameListIsSet || PL_strcmp(sonameList, sonameListToSave)) {
// if user specified some bogus soname I overwrite it here,