Closed Bug 1401282 Opened 8 years ago Closed 8 years ago

Sending a null intent to the search activity crashes Firefox

Categories

(Firefox for Android Graveyard :: Search Activity, defect)

defect
Not set
normal

Tracking

(firefox57+ verified, firefox58 verified)

VERIFIED FIXED
Firefox 58
Tracking Status
firefox57 + verified
firefox58 --- verified

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file)

adb shell am broadcast -n org.mozilla.firefox/org.mozilla.search.SearchWidget crahes Firefox.
[Tracking Requested - why for this release]: Crash that partner found while working on preload.
Comment on attachment 8913865 [details] Bug 1401282 - Don't assume the intent has an action. https://reviewboard.mozilla.org/r/185262/#review190644 ::: mobile/android/search/java/org/mozilla/search/SearchWidget.java:68 (Diff revision 1) > @Override > public void onReceive(final Context context, final Intent intent) { > // This will hold the intent to redispatch. > - final Intent redirect; > - switch (intent.getAction()) { > + Intent redirect = null; > + final String action = intent.getAction(); > + if (action != null) { Best to just rearly-return here to avoid having to indent the entire switch block. if (action == null) { super.onReceive(context, intent); return; }
Attachment #8913865 - Flags: review?(snorp) → review-
Attachment #8913865 - Flags: review?(snorp) → review+
Pushed by mozilla@kaply.com: https://hg.mozilla.org/integration/autoland/rev/d300dade1d49 Don't assume the intent has an action. r=snorp
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Comment on attachment 8913865 [details] Bug 1401282 - Don't assume the intent has an action. Approval Request Comment [Feature/Bug causing the regression]: Simple crasher [User impact if declined]: Crash with null intent [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: In bug [List of other uplifts needed for the feature/fix]: None [Is the change risky?]: No [Why is the change risky/not risky?]: Just bailing out early if there is no action. [String changes made/needed]: None I know this seems an odd one to request uplift, but a partner found it (working on a new phone) and it's a simple crasher fix.
Attachment #8913865 - Flags: approval-mozilla-beta?
Comment on attachment 8913865 [details] Bug 1401282 - Don't assume the intent has an action. Partner ask, not-null check, Beta57+
Attachment #8913865 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Assignee: nobody → mozilla
Verified this using the command line listed in Comment 0 on a Huawei Media Pad 2 (5.1.1). Fennec did no longer crash.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: