Last Comment Bug 706682 - don't access bgra[4]
: don't access bgra[4]
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla11
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
: Benjamin Smedberg [:bsmedberg]
Mentors:
Depends on: 790830
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-30 15:12 PST by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-09-12 18:13 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix it (1.80 KB, patch)
2011-11-30 16:05 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Splinter Review
fix it (1.92 KB, patch)
2011-11-30 17:26 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
jaas: review+
Details | Diff | Splinter Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-11-30 15:12:00 PST

    
Comment 1 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-11-30 16:05:03 PST
Created attachment 578121 [details] [diff] [review]
fix it

https://tbpl.mozilla.org/?tree=Try&rev=134e95588dc2
Comment 2 Josh Aas 2011-11-30 17:06:48 PST
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.
Comment 3 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-11-30 17:26:41 PST
Created attachment 578143 [details] [diff] [review]
fix it

https://tbpl.mozilla.org/?tree=Try&rev=5095ce6e2f05
Comment 4 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-11-30 17:28:01 PST
obviously I forgot a printf in it, I will remove it if the rest of the patch is OK.
Comment 5 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-12-01 05:36:50 PST
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=4835dc9b8fc7
Comment 6 Matt Brubeck (:mbrubeck) 2011-12-01 11:37:51 PST
https://hg.mozilla.org/mozilla-central/rev/4835dc9b8fc7

Note You need to log in before you can comment on or make changes to this bug.