Closed Bug 829420 Opened 11 years ago Closed 11 years ago

[Camera] In GonkNativeWindow::dequeueBuffer, -1 will be used as index to access an Arrary

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mchen, Assigned: mchen)

Details

Attachments

(1 file, 1 obsolete file)

Please refer to link as below for exact code position.
http://mxr.mozilla.org/mozilla-central/source/dom/camera/GonkNativeWindow.cpp#228

And to use -1 as an index to access array may causes segfault.
Attached patch Patch v1 (obsolete) — Splinter Review
Before use variable - found as an index, to check whether it is small then 0 first.
Assignee: nobody → mchen
Attachment #700860 - Flags: review?(kchen)
Attachment #700860 - Attachment is patch: true
Comment on attachment 700860 [details] [diff] [review]
Patch v1

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

nice catch
Attachment #700860 - Flags: review?(kchen) → review+
1. Add reviewer.
2. Wait for try.
https://tbpl.mozilla.org/?tree=Try&rev=099f53085d4b
Attachment #700860 - Attachment is obsolete: true
Attachment #700945 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/3e7dc5bede82
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: