Closed Bug 1338548 Opened 3 years ago Closed 3 years ago

Uninitialized rv in PendingGlobalHistoryEntry::ApplyChanges(IHistory* aHistory)


(Core :: DOM: Navigation, defect)

Not set



Tracking Status
firefox-esr45 --- unaffected
firefox51 --- unaffected
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- wontfix
firefox54 --- fixed


(Reporter: mccr8, Assigned: Nika)


(Blocks 1 open bug)


(Keywords: csectype-uninitialized, regression, Whiteboard: CID 1399513)


(1 file)

I found this while looking at Coverity results:

  for (const URITitle& title : mTitles) {
    aHistory->SetURITitle(title.mURI, title.mTitle);
    NS_ENSURE_SUCCESS(rv, rv);

The rv check there looks completely bogus. SetURITitle doesn't return an rv, so maybe the check just needs to be removed? I don't know if there are sec implications, so I'm filing this hidden.
Flags: needinfo?(michael)
I highly doubt that this will have any sec implications. 

1. This code is never hit in firefox without enabling the super buggy prerendering pref, which is turned on on no channels currently.
2. This not early returning has almost no impact on the behavior of this function, as mTitles is almost always 1 long.

I'll write up a simple patch anyway. It's not worth it to uplift IMO.
Flags: needinfo?(michael)
(In reply to Michael Layzell [:mystor] from comment #1)
> I'll write up a simple patch anyway. It's not worth it to uplift IMO.

Thanks. I guess the only question is if it could be causing any of the intermittent failures blocking bug  1330332.
Group: dom-core-security
I think it is extremely unlikely that this is the cause of any of those intermittent failures. 

MozReview-Commit-ID: 6aPtNrqoqZj
Attachment #8836244 - Flags: review?(bugs)
Assignee: nobody → michael
Attachment #8836244 - Flags: review?(bugs) → review+
Pushed by
Check the return value from aHistory->SetURITitle when applying pending global history entries, r=smaug
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.