mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bug 242990 Crash when LDAP query results content none UTF8 characters
r+sr=dmose, patch by wind.li@sun.com
This commit is contained in:
parent
0afa513e3d
commit
cb32b404e8
@ -518,7 +518,11 @@ nsLDAPMessage::GetValues(const char *aAttr, PRUint32 *aCount,
|
||||
//
|
||||
PRUint32 i;
|
||||
for ( i = 0 ; i < numVals ; i++ ) {
|
||||
(*aValues)[i] = UTF8ToNewUnicode(nsDependentCString(values[i]));
|
||||
nsDependentCString sValue(values[i]);
|
||||
if (IsUTF8(sValue))
|
||||
(*aValues)[i] = UTF8ToNewUnicode(sValue);
|
||||
else
|
||||
(*aValues)[i] = ToNewUnicode(sValue);
|
||||
if ( ! (*aValues)[i] ) {
|
||||
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, aValues);
|
||||
ldap_value_free(values);
|
||||
|
Loading…
x
Reference in New Issue
Block a user