Closed
Bug 13598
Opened 26 years ago
Closed 26 years ago
nsAutoString ucs2(CBufDescriptor("ucs2", PR_TRUE, strlen("ucs2"))) crashes
Categories
(Core :: DOM: HTML Parser, defect, P1)
Tracking
()
VERIFIED
FIXED
People
(Reporter: sfraser_bugs, Assigned: mikepinkerton)
Details
Recently, some changes were made like this in HTML parser:
< nsString ucs2("ucs2");
---
> nsAutoString ucs2(CBufDescriptor("ucs2", PR_TRUE, strlen("ucs2")));
These cause problems; somewhere, we write off the of the buffer, and bad shit
happens. This may have something to do with this line in
CBufDescriptor::CBufDescriptor(char* aString,PRBool aStackBased,PRUint32
aCapacity,PRInt32 aLength) {
mCapacity=aCapacity-1;
| Reporter | ||
Updated•26 years ago
|
Summary: nsAutoString ucs2(CBufDescriptor("ucs2", PR_TRUE, strlen("ucs2"))); does not work → nsAutoString ucs2(CBufDescriptor("ucs2", PR_TRUE, strlen("ucs2"))) crashes
| Reporter | ||
Comment 1•26 years ago
|
||
Adjust summary to be more accurate.
Updated•26 years ago
|
Severity: normal → blocker
Priority: P3 → P1
Comment 2•26 years ago
|
||
linux, viewer, test8, type in a text field, crash.
blocker.
| Assignee | ||
Comment 3•26 years ago
|
||
maybe this is another good argument for why we need a simpler mechanism for
strings that don't copy. ;) ;) ;)
The call is being used wrong. Here's the correct call in this case:
nsAutoString ucs2(CBufDescriptor("ucs2", PR_TRUE, strlen("ucs2")+1));
| Assignee | ||
Comment 5•26 years ago
|
||
that's what i thought, but no one would try that fix for me ;)
Thanks rick.
| Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 6•26 years ago
|
||
closing out bug. it seems to have been fixed by hook or by crook.
Updated•26 years ago
|
Whiteboard: [19990914] sfraser, is this fixed?
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Whiteboard: [19990914] sfraser, is this fixed?
Comment 7•26 years ago
|
||
fixed per reporter
You need to log in
before you can comment on or make changes to this bug.
Description
•