Add missing cstring includes to security/pkix/lib/.

RESOLVED FIXED in Firefox 43

Status

()

Core
Security
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Jacek Caban, Assigned: Jacek Caban)

Tracking

Trunk
mozilla43
Unspecified
Windows
Points:
---

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

fix
2.17 KB, patch
briansmith
: review+
Details | Diff | Splinter Review
(Assignee)

Description

3 years ago
Created attachment 8654039 [details] [diff] [review]
fix

Those includes are needed on mingw for memcmp/memmove/memset functions since string include was removed from Char16.h.
Attachment #8654039 - Flags: review?(brian)
Comment on attachment 8654039 [details] [diff] [review]
fix

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

Thanks for the patch.

I believe the patch for bug 1189891 broke this.

The proper fix needs to be consistent with the fix for bug 1189891: change the code to use std::equals and similar instead of mem*, and remove all #include <cstring>.
Attachment #8654039 - Flags: review?(brian) → review-
(Assignee)

Comment 2

3 years ago
Created attachment 8654502 [details] [diff] [review]
fix

Thanks for the review. The attached patch avoids dependency on cstring.
Attachment #8654039 - Attachment is obsolete: true
Attachment #8654502 - Flags: review?(brian)
Comment on attachment 8654502 [details] [diff] [review]
fix

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

Thanks! Just one small issue.

::: security/pkix/lib/pkixnames.cpp
@@ +1700,5 @@
>            address + (2u * static_cast<size_t>(contractionIndex)),
>            componentsToMove * 2u);
>    // Fill in the contracted area with zeros.
> +  uint8_t* ptr = address + 2u * static_cast<size_t>(contractionIndex);
> +  std::fill(ptr, ptr + (8u - static_cast<size_t>(numComponents)) * 2u, 0u);

Please use std::fill_n here, without |ptr|.
Attachment #8654502 - Flags: review?(brian) → review-
(Assignee)

Comment 4

3 years ago
Created attachment 8654515 [details] [diff] [review]
fix

Thanks. The attached version uses fill_n.
Attachment #8654502 - Attachment is obsolete: true
Attachment #8654515 - Flags: review?(brian)
Attachment #8654515 - Flags: review?(brian) → review+
Keywords: checkin-needed
(Assignee)

Comment 8

3 years ago
There was a typo, I pushed fixed version to try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=78c436350e59

Sorry about that.
https://hg.mozilla.org/mozilla-central/rev/a3197d3b445b
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox43: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.