mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Fix for bug 43892; properly calculate unicode string length; r=matt@netscape.com
This commit is contained in:
parent
888cb9091a
commit
7178aef1c7
@ -436,7 +436,7 @@ PRUnichar * nsFilePicker::ConvertFromFileSystemCharset(const char *inString)
|
||||
PRInt32 outLength;
|
||||
rv = mUnicodeDecoder->GetMaxLength(inString, inLength, &outLength);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
outString = NS_STATIC_CAST( PRUnichar*, nsMemory::Alloc( outLength+1 * sizeof( PRUnichar ) ) );
|
||||
outString = NS_STATIC_CAST( PRUnichar*, nsMemory::Alloc( (outLength+1) * sizeof( PRUnichar ) ) );
|
||||
if (nsnull == outString) {
|
||||
return nsnull;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user