Closed Bug 1228342 Opened 4 years ago Closed 4 years ago

[Static Analysis][Uninitialized Members In Class] Class LoadInfo from LoadInfo.cpp has member mTainting uninitialized in one constructor

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1340245)

Attachments

(1 file, 2 obsolete files)

The Static Analysis tool Coverity added that mTainting is uninitialized in one contructor:
LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
                   nsIPrincipal* aTriggeringPrincipal,
                   nsSecurityFlags aSecurityFlags,
                   nsContentPolicyType aContentPolicyType,
                   bool aUpgradeInsecureRequests,
                   bool aUpgradeInsecurePreloads,
                   uint64_t aInnerWindowID,
                   uint64_t aOuterWindowID,
                   uint64_t aParentOuterWindowID,
                   bool aEnforceSecurity,
                   bool aInitialSecurityCheckDone,
                   const OriginAttributes& aOriginAttributes,
                   nsTArray<nsCOMPtr<nsIPrincipal>>& aRedirectChainIncludingInternalRedirects,
                   nsTArray<nsCOMPtr<nsIPrincipal>>& aRedirectChain)
Whiteboard: CID 1340245
Attached patch Bug 1228342.diff (obsolete) — Splinter Review
Hello Patrick,

Could you please take a look over this patch?

THX
Attachment #8692543 - Flags: review?(mcmanus)
Comment on attachment 8692543 [details] [diff] [review]
Bug 1228342.diff

lgtm, but let's double check with Ben that its the right default
Attachment #8692543 - Flags: review?(mcmanus)
Attachment #8692543 - Flags: review?(bkelly)
Attachment #8692543 - Flags: feedback+
Comment on attachment 8692543 [details] [diff] [review]
Bug 1228342.diff

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

Wow.  Thanks for catching this!
Attachment #8692543 - Flags: review?(bkelly) → review+
Hi, this failed to apply:

patching file netwerk/base/LoadInfo.cpp
Hunk #1 FAILED at 127
1 out of 1 hunks FAILED -- saving rejects to file netwerk/base/LoadInfo.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh Bug_1228342.diff

could you take a look, thanks!
Flags: needinfo?(bogdan.postelnicu)
Keywords: checkin-needed
Attached patch Bug 1228342.diff (obsolete) — Splinter Review
I've updated the patch, it seemed that were several updates to LoadInfo.cpp from the time i've made the patch till now when it was tried to apply it. Updated to the last version and i've qrefresh it.
Flags: needinfo?(bogdan.postelnicu)
Keywords: checkin-needed
Attached patch Bug 1228342.diffSplinter Review
this one should do it.
THX
Attachment #8692543 - Attachment is obsolete: true
Attachment #8694615 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9b6075887a72
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.