Closed
Bug 269254
Opened 20 years ago
Closed 18 years ago
Bug in utf16ToUcs4()
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: MatsPalmgren_bugz, Assigned: sciguyryan)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
666 bytes,
patch
|
Biesinger
:
review+
Biesinger
:
superreview+
|
Details | Diff | Splinter Review |
Followup from bug 250900 comment 16: When utf16ToUcs4() in netwerk/dns/src/nsIDNService.cpp truncates the result it returns a 'outLen' that is 1 too much. The suggested patch in bug 250900 comment 16 still works (attachment 153220 [details] [diff] [review]).
Updated•18 years ago
|
Assignee: darin → nobody
QA Contact: benc → networking
| Assignee | ||
Comment 1•18 years ago
|
||
Patch v1. * The null terminating character is set at |out[outBufLen-1]| so the length of the string will be one greater, set |outLen| too |outBufLen|.
Assignee: nobody → sciguyryan+bugzilla
Status: NEW → ASSIGNED
Attachment #244690 -
Flags: superreview?
Attachment #244690 -
Flags: review?
| Assignee | ||
Updated•18 years ago
|
Attachment #244690 -
Flags: superreview?(cbiesinger)
Attachment #244690 -
Flags: superreview?
Attachment #244690 -
Flags: review?(cbiesinger)
Attachment #244690 -
Flags: review?
Updated•18 years ago
|
Attachment #244690 -
Flags: superreview?(cbiesinger)
Attachment #244690 -
Flags: superreview+
Attachment #244690 -
Flags: review?(cbiesinger)
Attachment #244690 -
Flags: review+
| Assignee | ||
Updated•18 years ago
|
Whiteboard: [checkin needed]
Comment 2•18 years ago
|
||
mozilla/netwerk/dns/src/nsIDNService.cpp 1.30
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.9alpha
Comment 3•18 years ago
|
||
This patch doesn't seem right. With |*outLen = outBufLen;| you include the null terminator in the string's length. The non-error path of the function doesn't. The simple fix is to make it |*outLen = outBufLen - 1;|, or do what the patch Mats referred to did and set i to outBufLen - 1 and break to fall through to the non-error code path to set the null terminator and *outLen.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I was just going to make the same comment that jag made -- looks like this should be outBufLen-1.
| Assignee | ||
Comment 5•18 years ago
|
||
Patch v2 * Updated too comments (corrected). Thanks for the comments everyone!
Attachment #244690 -
Attachment is obsolete: true
Attachment #248922 -
Flags: superreview?(cbiesinger)
Attachment #248922 -
Flags: review?(cbiesinger)
Comment 6•18 years ago
|
||
Comment on attachment 248922 [details] [diff] [review] Patch v2 sorry for not noticing that :/
Attachment #248922 -
Flags: superreview?(cbiesinger)
Attachment #248922 -
Flags: superreview+
Attachment #248922 -
Flags: review?(cbiesinger)
Attachment #248922 -
Flags: review+
| Assignee | ||
Comment 7•18 years ago
|
||
(In reply to comment #6) > (From update of attachment 248922 [details] [diff] [review] [edit]) > sorry for not noticing that :/ > My fault really, I should have noticed that too - sorry for the waste of time!
Whiteboard: [checkin needed]
Comment 8•18 years ago
|
||
Followup checked in. mozilla/netwerk/dns/src/nsIDNService.cpp 1.32
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
You need to log in
before you can comment on or make changes to this bug.
Description
•