Closed
Bug 70337
Opened 24 years ago
Closed 24 years ago
Append(char*,length) does not work if string contains nulls
Categories
(Core :: XPCOM, defect, P4)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: hjtoi-bugzilla, Assigned: scc)
References
Details
I am trying to use nsCString as a buffer for char* data which could contain
nulls in the middle. However, it appears that if I append such a buffer with
Append(char*,length), the length gets lost somewhere and it is set to 0. Later,
when I do Length() it also returns 0.
I have made my own buffer class for my purposes so this is not urgent for me,
but if this was fixed I could remove my class. See bug 49572.
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
OS: Windows NT → All
Hardware: PC → All
Target Milestone: --- → mozilla0.8.1
Assignee | ||
Updated•24 years ago
|
Priority: -- → P4
Assignee | ||
Comment 1•24 years ago
|
||
You may prefer to use one of the new string classes as your buffer, or directly
use the same buffer machinery that strings themselves use. If this is the case,
then this bug will become invalid when the current implementation of |nsCString|
is retired. See bug #70143 et al. In the mean time, I'll look into it.
Assignee | ||
Comment 2•24 years ago
|
||
I believe I have fixed this on the STRING_081_BRANCH, though I'll need to add a
case for this to my string unit tests; when the branch is merged into the trunk,
I'll close this bug
Assignee | ||
Comment 3•24 years ago
|
||
(mass change) didn't get these in for target milestone mozilla0.8.1 but they are
very close. Moving all to mozilla0.9.
Target Milestone: mozilla0.8.1 → mozilla0.9
Assignee | ||
Comment 4•24 years ago
|
||
Removed |ns[C]String| speciallizations for |do_AppendFromReadable|, so this
should work again.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•