Closed Bug 1002929 Opened 6 years ago Closed 6 years ago

mozilla::pkix::der::GeneralizedTime uses implicit conversion from der::Result to boolean

Categories

(Core :: Security: PSM, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: briansmith, Assigned: briansmith)

Details

Attachments

(1 file)

No description provided.
Attachment #8414231 - Flags: review?(dkeeler)
Comment on attachment 8414231 [details] [diff] [review]
no-implicit-conversion.patch

Review of attachment 8414231 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Another thought: should we change the memcmp in Input::Expect to not do an implicit conversion? (i.e. "if (memcmp(input, expected, expectedLen) != 0)" on/around line 101)
Attachment #8414231 - Flags: review?(dkeeler) → review+
(In reply to David Keeler (:keeler) from comment #1)
> Another thought: should we change the memcmp in Input::Expect to
> not do an implicit conversion? (i.e. "if (memcmp(input, expected,
> expectedLen) != 0)" on/around line 101)

I think implicit conversion between int and bool is ok (desired, even).
(In reply to [:mmc] Monica Chew (please use needinfo) from comment #2)
> I think implicit conversion between int and bool is ok (desired, even).

I agree for memcmp at least.

Thanks for the review.
https://hg.mozilla.org/mozilla-central/rev/f8cb84a2584f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.