Closed Bug 737765 Opened 12 years ago Closed 12 years ago

aLength is not used in insertTextCB()

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: ginnchen+exoracle, Assigned: charles.wh.chan)

References

(Blocks 1 open bug)

Details

(Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++])

Attachments

(1 file)

http://mxr.mozilla.org/mozilla-central/ident?i=insertTextCB

So it doesn't conform the ATK atk_editable_text_insert_text() API, and it may cause read out of boundary if the string passing in is not null terminated.
The length should be explicitly passed into NS_ConvertUTF8toUTF16 constructor
Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++]
Please review the patch.
Attachment #608965 - Flags: review?(hub)
Comment on attachment 608965 [details] [diff] [review]
Bug 737765: Patch-1

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

looks good.
Attachment #608965 - Flags: review?(hub) → review+
Thanks, Hub. 

As I don't have checkin access, could you please kindly do so for me?
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec81d6124138

Is it possible to write a test for this?

Hub, you currently aren't listed as an a11y peer. You should probably fix that :)
https://wiki.mozilla.org/Modules/Core
Assignee: nobody → charles.wh.chan
Flags: in-testsuite?
Keywords: checkin-needed
Target Milestone: --- → mozilla14
> Is it possible to write a test for this?
Of course! Should I be looking under accessible/tests/mochitest/?
Sounds like the right spot, yes. Thanks!
> Is it possible to write a test for this?

not currently, (the short story is its only callable from c++), but eventually we should have a test harness to test these apis.  Feel free to leave in-testsuite? if you like, but be aware it will not be fixed for a while.

> Hub, you currently aren't listed as an a11y peer. You should probably fix
> that :)

well, last time I new Alex hadn't made him one, but I think Alex was close enough to asking him to review so I think its fine :)
> https://wiki.mozilla.org/Modules/C
Since Mochitests only supports Javascripts and these functions are not exposed. Should I be looking into 'Compiled-code automated tests' instead?
https://developer.mozilla.org/en/Compiled-code_automated_tests
(In reply to Charles Chan from comment #9)
> Since Mochitests only supports Javascripts and these functions are not
> exposed. Should I be looking into 'Compiled-code automated tests' instead?
> https://developer.mozilla.org/en/Compiled-code_automated_tests

no, don't worry about writing tests :)
https://hg.mozilla.org/mozilla-central/rev/ec81d6124138

Congratulations on your first patch in the tree! Hope to see you on IRC (http://irc.mozilla.org/) in #developers soon. 

If you'd like to fix another bug (we'd love it if you did!) but need some inspiration, pop on & say hi - and we'll find something for you :-)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
(In reply to Trevor Saunders (:tbsaunde) from comment #8)
> > Hub, you currently aren't listed as an a11y peer. You should probably fix
> > that :)
> 
> well, last time I new Alex hadn't made him one,

well, I don't make peers but I can do nominations, actually as any other peer.

> but I think Alex was close
> enough to asking him to review so I think its fine :)

that's right
Is it possible to create an automated test for our testsuite?
(In reply to Ryan VanderMeulen from comment #13)
> Is it possible to create an automated test for our testsuite?

No until MATS project is finished. Why do you care about this specific bug?
Just going through my request queue. I have a lot of in-testsuite? requests in it :)
this one may be not so important, so we could denominate it
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: