Closed Bug 2089978 Opened 18 days ago Closed 7 days ago

Initialize decodingErrors before DecodeSCTs increments it

Categories

(Core :: Security: PSM, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: Sylvestre, Assigned: evaprnn, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=c++])

Attachments

(1 external file)

Filing as a good first bug to learn workflows.

size_t decodingErrors; is passed to DecodeSCTs, which only increments it, so it starts from an indeterminate value (the result is then discarded). Initialize it: size_t decodingErrors = 0;.

Current code:

      CertVerifier::CertificateTransparencyMode::Disabled) {
    size_t decodingErrors;
    std::vector<SignedCertificateTimestamp> decodedSCTsFromExtension;

Link to the code:
https://searchfox.org/firefox-main/source/security/certverifier/NSSCertDBTrustDomain.cpp

To verify the fix:

./mach build

This was reported by Coverity Scan (CID 1678463). The analyzer will stop reporting it once the change lands.

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Assignee: nobody → evaprnn
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: