Closed
Bug 1085497
Opened 9 years ago
Closed 9 years ago
Use typedef for the length of mozilla::pkix::Input/Reader for safer casting
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: briansmith, Assigned: briansmith)
References
Details
Attachments
(1 file)
4.73 KB,
patch
|
mmc
:
review+
|
Details | Diff | Splinter Review |
Let's say you want to compute the diference of lengths of to Inputs: Input::size_type diff; if (a.GetLength() > b.GetLength()) { // The cast is required because operator- returns a signed type. diff = static_cast<Input::size_type>(a.GetLength() - b.GetLength()); } We could just use "uint16_t" but that would be problematic if/when we need to change the maximum length of Input/Reader.
Attachment #8508064 -
Flags: review?(mmc)
Updated•9 years ago
|
Attachment #8508064 -
Flags: review?(mmc) → review+
Assignee | ||
Comment 1•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d83b21c98e8 Thanks for the quick review.
Comment 2•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9d83b21c98e8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•