The default bug view has changed. See this FAQ.

don't access bgra[4]

RESOLVED FIXED in mozilla11

Status

()

Core
Plug-ins
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

unspecified
mozilla11
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Summary: don't access element -1 → don't access bgra[5]
Summary: don't access bgra[5] → don't access bgra[4]
Created attachment 578121 [details] [diff] [review]
fix it

https://tbpl.mozilla.org/?tree=Try&rev=134e95588dc2
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attachment #578121 - Flags: review?(ehsan)

Comment 2

5 years ago
Comment on attachment 578121 [details] [diff] [review]
fix it

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

::: dom/plugins/test/testplugin/nptest_utils.cpp
@@ +93,5 @@
>  parseHexColor(const char* color, int len)
>  {
>    PRUint8 bgra[4] = { 0, 0, 0, 0xFF };
>    int i = 0;
> +  assert(len == 9);

The description for this function strongly implies that the length does not have to be a full nine characters.
Created attachment 578143 [details] [diff] [review]
fix it

https://tbpl.mozilla.org/?tree=Try&rev=5095ce6e2f05
Attachment #578121 - Attachment is obsolete: true
Attachment #578121 - Flags: review?(ehsan)
Attachment #578143 - Flags: review?(joshmoz)
obviously I forgot a printf in it, I will remove it if the rest of the patch is OK.

Updated

5 years ago
Attachment #578143 - Flags: review?(joshmoz) → review+
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=4835dc9b8fc7
https://hg.mozilla.org/mozilla-central/rev/4835dc9b8fc7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11

Updated

5 years ago
Depends on: 790830
You need to log in before you can comment on or make changes to this bug.