Closed Bug 1131250 Opened 6 years ago Closed 6 years ago

[Camera][Gecko] MapIsoFromGonk() SIGSEGVs on aIso == nullptr

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox38 fixed)

RESOLVED FIXED
2.2 S6 (20feb)
Tracking Status
firefox38 --- fixed

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

Attachments

(1 file, 1 obsolete file)

Found while investigating camera on Shinano.
Assignee: nobody → mhabicher
Status: NEW → ASSIGNED
Attachment #8561611 - Flags: review?(aosmond)
Comment on attachment 8561611 [details] [diff] [review]
Handle ISO_MODE value == nullptr, v1

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

LGTM although I note that we print out the potentially null string in GonkCameraParameters::Initialize. I assume that all of our various printf paths are %s + null pointer safe?
Attachment #8561611 - Flags: review?(aosmond) → review+
(In reply to Andrew Osmond [:aosmond] from comment #2)

> LGTM although I note that we print out the potentially null string in
> GonkCameraParameters::Initialize. I assume that all of our various printf
> paths are %s + null pointer safe?

In the Initialize() case, the array of isoModes has a zero length, so nothing gets printed.

Right now, this bug really only pops up when inspecting the object in the WebIDE, where .isoMode gets queried regardless of what capabilities.isoModes returns. So this just makes it more robust.
Make the calling function more robust as well. Practically, this means we'll never actually hit MapIsoFromGonk() at all, but we should keep the !aIso check in there anyway just in case.
Attachment #8561611 - Attachment is obsolete: true
Attachment #8561654 - Flags: review?(aosmond)
Attachment #8561654 - Flags: review?(aosmond) → review+
https://hg.mozilla.org/mozilla-central/rev/57362968b46a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S6 (20feb)
You need to log in before you can comment on or make changes to this bug.