Closed Bug 706682 Opened 13 years ago Closed 13 years ago

don't access bgra[4]

Categories

(Core Graveyard :: Plug-ins, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla11

People

(Reporter: espindola, Assigned: espindola)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Summary: don't access element -1 → don't access bgra[5]
Summary: don't access bgra[5] → don't access bgra[4]
Attached patch fix it (obsolete) — Splinter Review
https://tbpl.mozilla.org/?tree=Try&rev=134e95588dc2
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attachment #578121 - Flags: review?(ehsan)
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.
obviously I forgot a printf in it, I will remove it if the rest of the patch is OK.
Attachment #578143 - Flags: review?(joshmoz) → review+
https://hg.mozilla.org/mozilla-central/rev/4835dc9b8fc7
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Depends on: 790830
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: