Closed
Bug 987262
Opened 11 years ago
Closed 11 years ago
mozilla::pkix::der::Input::AtEnd returns a bool, not a Result (so don't compare the two)
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: keeler, Assigned: keeler)
References
Details
Attachments
(1 file, 1 obsolete file)
1.49 KB,
patch
|
briansmith
:
review+
|
Details | Diff | Splinter Review |
https://mxr.mozilla.org/mozilla-central/source/security/pkix/lib/pkixder.h#260
260 if (!nested.AtEnd() != Success) {
261 return Fail(SEC_ERROR_BAD_DER);
262 }
Line 260 should be 'if (!nested.AtEnd()) {'
This is the only instance of this I could find.
Attachment #8395804 -
Flags: review?(cviecco)
Assignee | ||
Updated•11 years ago
|
Blocks: mozilla::pkix
Updated•11 years ago
|
Attachment #8395804 -
Flags: review?(cviecco) → review+
Comment 1•11 years ago
|
||
Comment on attachment 8395804 [details] [diff] [review]
patch
Review of attachment 8395804 [details] [diff] [review]:
-----------------------------------------------------------------
::: security/pkix/lib/pkixder.h
@@ +256,5 @@
> if (decoder(nested) != Success) {
> return Failure;
> }
>
> + if (!nested.AtEnd()) {
This also works:
return End(input);
Comment 2•11 years ago
|
||
(In reply to Brian Smith (:briansmith, was :bsmith; NEEDINFO? for response) from comment #1)
> return End(input);
I meant End(nested);
I think there should be some compiler warnings that catch this, and warnings-as-errors should have caused the built to fail. I wonder why that didn't happen.
Assignee: nobody → dkeeler
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
Ok - I refactored the common checks to use der::End where appropriate.
Attachment #8395804 -
Attachment is obsolete: true
Attachment #8395827 -
Flags: review?(brian)
Updated•11 years ago
|
Attachment #8395827 -
Flags: review?(brian) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Thanks for the quick reviews.
https://hg.mozilla.org/integration/mozilla-inbound/rev/53fcaeb264ba
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•