Check the result of PrincipalToPrincipalInfo for the interception triggering principal
Categories
(Core :: IPC, task)
Tracking
()
People
(Reporter: Sylvestre, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++])
Filing as a good first bug to learn workflows.
In LoadInfoToLoadInfoArgs, every other PrincipalToPrincipalInfo call is followed by NS_ENSURE_SUCCESS(rv, rv);, but the one for interceptionInfo->TriggeringPrincipal() is not, so a failure is overwritten by the next assignment. Add the same check.
Current code:
triggeringPrincipalInfo.emplace();
rv = PrincipalToPrincipalInfo(interceptionInfo->TriggeringPrincipal(),
triggeringPrincipalInfo.ptr());
Link to the code:
https://searchfox.org/firefox-main/source/ipc/glue/BackgroundUtils.cpp
To verify the fix:
./mach build
This was reported by Coverity Scan (CID 1539705). 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.
Description
•