Comment 37 for bug 85579

Revision history for this message
In , Sspitzer (sspitzer) wrote :

Is this safe?

-
if (NS_FAILED(ConvertFromUnicode(fileCharset, nsAutoString(aNewName),
&convertedNewName)))
+ nsAutoString tmpAutoString;
+ tmpAutoString.AssignWithConversion(newSafeName);
+ if (NS_FAILED(ConvertFromUnicode(fileCharset, tmpAutoString, &convertedNewName)))

before your fix, we used aNewName, which was the PRUnichar * that they user
typed in. (could have been the folder name, in chinese.)

now, we are converting newSafeName, which is going to be a hashed version that
might be altered because of illegal chars or illegal length.

what do we do with convertedNewName after this?