Liveconnect bug in ns4xPlugin.cpp

RESOLVED FIXED

Status

()

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

People

(Reporter: jhp (no longer active), Assigned: jhp (no longer active))

Tracking

Trunk
x86
OS/2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
From Innotek:

While investigating the liveconnect problem I have noticed another bug in
Mozilla OS2 code located in ns4xPlugin::ns4xPlugin and ns4xPlugin::CreatePlugin
in modules/plugin/base/src/ns4xPlugin.cpp

Flash plugin expects that the pointer to the  NPPluginFuncs structure passed as
parameter for NP_GetEntryPoints plugin function will not change in future. The
pointer is saved by plugin and accessed later at various places.
NS4.x does not change the pointer as well.

OS2 code initializes a local copy of the structure on stack and then
copies it to the class member.

So, the abovementioned functions should initialize fCallbacks structure like
Windows code does, that is pass the class member address to the
NP_GetEntryPoints. (see ns4xPlugin::ns4xPlugin #if defined(XP_WIN) branch)

Changes in ns4xPlugin.cpp may be:
line 303: #if defined(XP_WIN) || defined (XP_OS2)

lines 544-562: all removed (commented out)

line 564:  *aResult = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
(Assignee)

Comment 1

14 years ago
reassign to myself
Assignee: peterlubczynski-bugs → pedemont

Comment 2

14 years ago
Javier, could you put a diff in here?

Comment 3

14 years ago
Javier - post a freaking diff!

Comment 4

14 years ago
Javier:

Hey loser boy. How about a patch?
(Assignee)

Comment 5

14 years ago
Created attachment 135448 [details] [diff] [review]
patch
(Assignee)

Updated

14 years ago
Attachment #135448 - Flags: review?(mkaply)

Comment 6

14 years ago
Comment on attachment 135448 [details] [diff] [review]
patch

r=mkaply, sr=blizzard (platform specific) a=mkaply for 1.6b
Attachment #135448 - Flags: superreview+
Attachment #135448 - Flags: review?(mkaply)
Attachment #135448 - Flags: review+
Attachment #135448 - Flags: approval1.6b+

Comment 7

14 years ago
Fix checked in to branch and trunk.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.