Open
Bug 47476
Opened 25 years ago
Updated 3 years ago
nsCID::Parse() accepts invalid CID strings.
Categories
(Core :: XPCOM, defect, P5)
Tracking
()
NEW
Future
People
(Reporter: jud, Unassigned)
Details
(Keywords: helpwanted)
If you had Parse() a bogus, inproperly formated string, it will still succeed.
Comment 2•25 years ago
|
||
I have been looking through source code trying with no success to find an
example of where this call is used.
As described, this seems to be a low-priority bug. It only causes a problem if
someone passes in an improperly-formatted string. They will probably fail as
soon as they try to use the CID. The code in nsID.cpp of the Parse method is
checking the length and nothing else to compute the return value. This really
should be a programming error, not a run-time error, it seems to me. If this
were often-used, it would seem silly for this method to be called passing in a
constant, yet checking the return, since the constant never changes. If it is
silly to check the return, then it seems silly to even provide the return,
unless there is some case where these values are being suplied not as constants.
What are some significant use cases that this bug fixes?
| Reporter | ||
Comment 3•25 years ago
|
||
I fixed a place that was using it to no longer use it because it's broken.
Comment 4•25 years ago
|
||
Can you tell me a bit more about the use case involved? Was it a literal string
it was trying to parse, or did the string come from some other source?
Also, the bug report mentioned breakage only when the syntax was wrong. Did it
not function correctly when the syntax was right, or is wrong syntax a normal
part of the operation of this particular use case?
| Reporter | ||
Comment 5•25 years ago
|
||
wrong syntax was being passed in, the use case was busted. this bug is just to
tell the user when parse() is doing something it doesn't handle well.
here's what I ripped out.
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&fi
le=nsHTTPHandler.cpp&root=/cvsroot&subdir=mozilla/netwerk/protocol/http/src&comm
and=DIFF_FRAMESET&rev1=1.123&rev2=1.124
Comment 6•25 years ago
|
||
I agree that the use case is busted, based upon the diff.
Thanks, I was just trying to discover any use cases for the method that might
require it to be fixed nsbeta3.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 8•25 years ago
|
||
Edward: Welcome to xpcom!
Status: ASSIGNED → NEW
Target Milestone: Future → mozilla1.0
Comment 9•25 years ago
|
||
Once again... attempting to reassign from Ray to Edward.
Assignee: rayw → kandrot
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: P3 → P5
Comment 10•24 years ago
|
||
reassign all kandrot xpcom bug.
Assignee: kandrot → dougt
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0 → ---
Updated•24 years ago
|
Keywords: helpwanted
Target Milestone: --- → Future
Updated•19 years ago
|
Assignee: dougt → nobody
QA Contact: rayw → xpcom
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•