Closed Bug 218685 Opened 21 years ago Closed 21 years ago

Liveconnect bug in ns4xPlugin.cpp

Categories

(Core Graveyard :: Plug-ins, defect)

x86
OS/2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jhpedemonte, Assigned: jhpedemonte)

Details

Attachments

(1 file)

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);
reassign to myself
Assignee: peterlubczynski-bugs → pedemont
Javier, could you put a diff in here?
Javier - post a freaking diff!
Javier:

Hey loser boy. How about a patch?
Attached patch patchSplinter Review
Attachment #135448 - Flags: review?(mkaply)
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+
Fix checked in to branch and trunk.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
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: