nsAutoString temp; temp.AssignWithConversion(url->passwordRealm);
nsAutoString temp; temp.AssignASCII(url->passwordRealm);
si_GetURLAndUserForChangeForm(nsIPrompt* dialog, const nsString& password){  si_SignonURLStruct* url;  si_SignonUserStruct* user;  si_SignonDataStruct * data;  PRInt32 user_count;  PRUnichar ** list;  PRUnichar ** list2;  si_SignonUserStruct** users;  si_SignonUserStruct** users2;  si_SignonURLStruct** urls;  si_SignonURLStruct** urls2;  /* get count of total number of user nodes at all url nodes */  user_count = 0;  PRInt32 urlCount = LIST_COUNT(si_signon_list);  for (PRInt32 i=0; i<urlCount; i++) {    url = NS_STATIC_CAST(si_SignonURLStruct*, si_signon_list->ElementAt(i));    PRInt32 userCount = url->signonUser_list.Count();    for (PRInt32 ii=0; ii<userCount; ii++) {      user = NS_STATIC_CAST(si_SignonUserStruct*, url->signonUser_list.ElementAt(ii));      user_count++;    }  }  /* avoid malloc of zero */  if( user_count == 0 )  {    return NULL;  }    /* allocate lists for maximumum possible url and user names */  list = (PRUnichar**)PR_Malloc(user_count*sizeof(PRUnichar*));  users = (si_SignonUserStruct **) PR_Malloc(user_count*sizeof(si_SignonUserStruct*));  urls = (si_SignonURLStruct **)PR_Malloc(user_count*sizeof(si_SignonUserStruct*));  list2 = list;  users2 = users;  urls2 = urls;      /* step through set of URLs and users and create list of each */  user_count = 0;  PRInt32 urlCount2 = LIST_COUNT(si_signon_list);  for (PRInt32 i2=0; i2<urlCount2; i2++) {    url = NS_STATIC_CAST(si_SignonURLStruct*, si_signon_list->ElementAt(i2));    PRInt32 userCount = url->signonUser_list.Count();    for (PRInt32 i3=0; i3<userCount; i3++) {      user = NS_STATIC_CAST(si_SignonUserStruct*, url->signonUser_list.ElementAt(i3));      /* find saved password and see if it matches password user just entered */      PRInt32 dataCount = user->signonData_list.Count();      for (PRInt32 i4=0; i4<dataCount; i4++) {        data = NS_STATIC_CAST(si_SignonDataStruct*, user->signonData_list.ElementAt(i4));        if (data->isPassword && si_CompareEncryptedToCleartext(data->value, password)) {          /* passwords match so add entry to list */          /* consider first data node to be the identifying item */          data = NS_STATIC_CAST(si_SignonDataStruct *,                                user->signonData_list.ElementAt(0));          nsAutoString userName;          if (NS_SUCCEEDED(si_Decrypt (data->value, userName))) {            nsAutoString temp; temp.AssignWithConversion(url->passwordRealm);            temp.AppendLiteral(":");            temp.Append(userName);            *list2 = ToNewUnicode(temp);            list2++;            *(users2++) = user;            *(urls2++) = url;            user_count++;          }          break;        }      }    }  }  /* query user */  PRUnichar * msg = Wallet_Localize("SelectUserWhosePasswordIsBeingChanged");//@@@@ is 0 correct?  if (user_count && si_SelectDialog(msg, dialog, list, &user_count, 0)) {    user = users[user_count];    url = urls[user_count];    /*     * since this user node is now the most-recently-used one, move it     * to the head of the user list so that it can be favored for     * re-use the next time this form is encountered     */    url->signonUser_list.RemoveElement(user);    url->signonUser_list.InsertElementAt(user, 0);    si_signon_list_changed = PR_TRUE;    si_SaveSignonDataLocked("signons", PR_TRUE);  } else {    user = NULL;  }  Recycle(msg);  /* free allocated strings */  while (--list2 > list) {    Recycle(*list2);  }  PR_Free(list);  PR_Free(users);  PR_Free(urls);  return user;}