[Patch included] NPN_GetStringIdentifiers implementation is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nspluginwrapper |
Fix Released
|
Medium
|
|||
nspluginwrapper (Ubuntu) |
Fix Released
|
Low
|
Fabien Tassin |
Bug Description
Binary package hint: nspluginwrapper
There is a bug in the NPN_GetStringId
My fix is to change NPIdentifiers to be passed by pointer. I sent the patch to upstream a while ago, but the author hasn't responded and there hasn't been any activity on the upstream nspluginwrapper source control system in a while. But I figure you'd probably like to incorporate it into Ubuntu.
Note that the patch has already been incorporated into Fedora. You can get more info about it here: https:/
Related branches
Changed in nspluginwrapper: | |
status: | Unknown → Confirmed |
Changed in nspluginwrapper (Ubuntu): | |
assignee: | nobody → Fabien Tassin (fta) |
status: | New → In Progress |
importance: | Undecided → Low |
Changed in nspluginwrapper: | |
importance: | Unknown → Medium |
status: | Confirmed → Fix Released |
Created attachment 353833
patch
Description of problem (by Tristan Schmelcher):
Hello,
I'm a developer on Google's open-source O3D plugin project for doing accelerated 3D rendering in web browsers ( code.google. com/apis/ o3d/). O3D is 32-bit only due to a dependency on
hardware-
http://
Google's V8 JavaScript JIT engine, so I've been working on compatibility
with nspluginwrapper so that we can support 64-bit Linux. Along the way I
discovered that one of the issues was a bug in nspluginwrapper's marshalling
of arrays of NPIdentifiers. A patch with the fix is attached. Apply with
"patch -p0 < FILENAME".
The bug exists in versions 1.2.0 and later. The issue is that NPIdentifiers NPIdentifier function by _value_, not by pointer, send_reply, but it results in a bug when marshalling send_args passes the individual elements by passing a pointer to NPIdentifier entifiers was
are passed to the do_send_
which is how other parameters are passed to their marshallers. This is fine
when calling rpc_method_
arrays of NPIdentifiers, because the array marshalling code in
rpc_message_
their position in the array. This resulted in do_send_
interpreting the address of the NPIdentifier as the NPIdentifier itself. As
a result, nspluginwrapper's implementation of NPN_GetStringId
broken, because the NPIdentifier values that it returned to the plugin were
mapped to garbage addresses in the browser.
My fix is to change NPIdentifiers to be passed by pointer. With this fix,
nspluginwrapper can successfully run O3D plugins built from our SVN trunk at
revision 19440 or later.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info: