Closed
Bug 227497
Opened 21 years ago
Closed 21 years ago
String conversion cleanup in nsLDAPChannel
Categories
(Directory :: LDAP XPCOM SDK, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jst, Assigned: dmosedale)
Details
Attachments
(1 file)
3.29 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
I guess this code aint used by default, but still. Patch coming up...
Reporter | ||
Comment 1•21 years ago
|
||
The biggest problem here was that:
rv = mReadPipeOut->Write(NS_ConvertUCS2toUTF8(entry).get(),
entryLength, &bytesWritten);
that code passed the length of the string in UTF16, but the data as UTF8, so
any time there were non-ASCII characters in that string, too few characters
would've been written out.
Reporter | ||
Updated•21 years ago
|
Attachment #136815 -
Flags: superreview?(dmose)
Attachment #136815 -
Flags: review?(dmose)
Reporter | ||
Updated•21 years ago
|
Attachment #136815 -
Flags: superreview?(peterv)
Attachment #136815 -
Flags: superreview?(dmose)
Attachment #136815 -
Flags: review?(peterv)
Attachment #136815 -
Flags: review?(dmose)
Comment 2•21 years ago
|
||
Comment on attachment 136815 [details] [diff] [review]
Cleanup...
>Index: directory/xpcom/base/src/nsLDAPChannel.cpp
>===================================================================
>@@ -941,48 +940,47 @@ nsLDAPChannel::OnLDAPSearchEntry(nsILDAP
> // print all values of this attribute
> //
> for ( PRUint32 j=0 ; j < valueCount; j++ ) {
>- AppendASCIItoUTF16(attrs[i], entry);
>- entry.Append(NS_LITERAL_STRING(": "));
>- entry.Append(vals[j]);
>- entry.Append(NS_LITERAL_STRING("\n"));
>+ entry.Append(attrs[i]);
>+ entry.Append(": ");
>+ AppendUTF16toUTF8(vals[j], entry);
>+ entry.Append("\n");
Make that Append('\n');
> // separate this entry from the next
> //
>- entry.Append(NS_LITERAL_STRING("\n"));
>+ entry.Append("\n");
Ditto.
Attachment #136815 -
Flags: superreview?(peterv)
Attachment #136815 -
Flags: superreview+
Attachment #136815 -
Flags: review?(peterv)
Attachment #136815 -
Flags: review+
Comment 3•21 years ago
|
||
Johnny, is this ready for checkin, or does it need to go by dmose?
Reporter | ||
Comment 4•21 years ago
|
||
Oh, sorry, this was checked in some time ago. Forgot to mark it fixed :-(
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 5•21 years ago
|
||
Indeed -
1.56 jst%mozilla.jstenback.com 2004-04-12 20:53 Fixing bug 227497. Cleaning up
some string usage in nsLDAPChannel. r+sr=peterv@propagandism.org
verified fixed.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•