Closed Bug 1061483 Opened 6 years ago Closed 6 years ago

Remove mozilla::pkix dependency on NSPR's PR_smprintf

Categories

(Core :: Security: PSM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: briansmith, Assigned: briansmith)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch no-PR_smprintf.patch (obsolete) — Splinter Review
No description provided.
Attachment #8482592 - Flags: review?(cviecco)
Comment on attachment 8482592 [details] [diff] [review]
no-PR_smprintf.patch

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

Almost r+

::: security/pkix/test/lib/pkixtestutil.cpp
@@ +447,5 @@
>    if (logPath) {
>      static int counter = 0;
> +
> +    std::ostringstream fileNameBuilder;
> +    fileNameBuilder << counter << '-' << suffix << ".der";

Please check the error flags of the stream here. (or comment how you guarantee failure on error).
Attachment #8482592 - Flags: review?(cviecco) → review-
Thanks for the review. This new patch addresses your concern.

I use ostringstream only for the int-to-string conversion, so I refactored the patch to make that clear. This makes the function that uses ostringstream more like the function that uses only string concatenation.
Attachment #8482592 - Attachment is obsolete: true
Attachment #8483291 - Flags: review?(cviecco)
Attachment #8483291 - Flags: review?(cviecco) → review+
This patch removes the deleteCharArray function, which is unused after the initial patch for the bug landed. Without this, clang-based builds break:

https://hg.mozilla.org/integration/mozilla-inbound/rev/0d8adc6d6faa
https://hg.mozilla.org/mozilla-central/rev/4b99d99e7d91
https://hg.mozilla.org/mozilla-central/rev/0d8adc6d6faa
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.