Closed Bug 1268365 Opened 8 years ago Closed 8 years ago

Check argument validity more in nsASN1Tree.cpp

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

Details

(Whiteboard: [psm-assigned])

Attachments

(1 file)

Many of the functions in nsASN1Tree.cpp don't have checks that ensure their arguments are valid. Checks should be added to ensure callers aren't doing the wrong thing.
Comment on attachment 8746944 [details]
MozReview Request: Bug 1268365 - Check argument validity more in nsASN1Tree.cpp. r=jcj

https://reviewboard.mozilla.org/r/49635/#review46533

I'm going to redirect to JC for this review. Also, I wouldn't spend too much effort on fixing up the nsASN1* code or any of the C++ code that implements the certificate manager/viewer, since it should pretty much all be rewritten in JS anyway (which is something I'm hoping will be possible in the nearish future).
Attachment #8746944 - Flags: review?(dkeeler)
Comment on attachment 8746944 [details]
MozReview Request: Bug 1268365 - Check argument validity more in nsASN1Tree.cpp. r=jcj

https://reviewboard.mozilla.org/r/49635/#review46749

Thank you for doing this cleanup, Cykesiopka! This looks good to me.
Attachment #8746944 - Flags: review?(jjones) → review+
Comment on attachment 8746944 [details]
MozReview Request: Bug 1268365 - Check argument validity more in nsASN1Tree.cpp. r=jcj

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/49635/diff/1-2/
Attachment #8746944 - Attachment description: MozReview Request: Bug 1268365 - Check argument validity more in nsASN1Tree.cpp. → MozReview Request: Bug 1268365 - Check argument validity more in nsASN1Tree.cpp. r=jcj
(In reply to David Keeler [:keeler] (use needinfo?) from comment #2)
> Also, I wouldn't spend too much
> effort on fixing up the nsASN1* code or any of the C++ code that implements
> the certificate manager/viewer, since it should pretty much all be rewritten
> in JS anyway (which is something I'm hoping will be possible in the nearish
> future).

Oh, cool! Good to know.
Thanks for the review!

https://treeherder.mozilla.org/#/jobs?repo=try&revision=5d231627c8a457e731dcad0a48f3436424bddf9c
(Ignore the Android checkstyle failure - nothing in the patch touches anything that would trigger such failures).
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4f4c042c6d3a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: