gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [patch #8909] Patches to fix exception handling in Gnash'


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [patch #8909] Patches to fix exception handling in Gnash's ExternalInterface implementation
Date: Thu, 11 Feb 2016 14:26:20 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:25.8) Gecko/20151123 Firefox/31.9 PaleMoon/25.8.1

URL:
  <http://savannah.gnu.org/patch/?8909>

                 Summary: Patches to fix exception handling in Gnash's
ExternalInterface implementation
                 Project: Gnash - The GNU Flash player
            Submitted by: nachanon
            Submitted on: Thu 11 Feb 2016 09:26:19 PM ICT
                Category: plugin
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Current Gnash's ExternalInterface uses a string-based _in-band signalling_ to
indicate failure on calling JavaScript or ActionScript function, by sending
"<string>Error</string>" or "<string>SecurityError</string>" as a return
value
back to the calling party. This interferes with the legitimate String return
value "Error" and "SecurityError"; and also caused libgnashplugin's crash on
special return value a.k.a. bug #47004.

This series of patches address the issue by dropping the string-based in-band
signalling in libgnashplugin and Gnash player, and use a correct return value
(`undefined`) in case of exception
<https://savannah.gnu.org/bugs/?47004#comment3> or other failures.


Patch 1 of 4:
See the attached
`0001_remove-bogus-plugin-externalinterface-return-value-check.patch`.

Original code in libgnashplugin tries to convert `NPVariant` return value
<http://git.savannah.gnu.org/cgit/gnash.git/tree/plugin/npapi/callbacks.cpp?id=435d3e9aa7864883f6a2379fd318126113786475#n705>
to string and check for magic error string. This fails when ActionScript code
actually return String "Error", "SecurityError"; *and crashes* when
ActionScript's return value is non-null and non-string, e.g. `NPObject` and
`void`.

The patch removes the check, allowing real "Error", and "SecurityError"
string return value to reach JavaScript, and prevents libgnashplugin from
crashing when non-string return value is encountered;
partially fixing bug #47004, unblocking bug #32411.

Once this patch is applied, `js2flash-errorstring.html` test
<https://savannah.gnu.org/bugs/?47004#comment0> from bug #47004
should show a correct result.

Gnash: 0.8.11dev (patched against git 435d3e9 6-Feb-2016) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 11 Feb 2016 09:26:19 PM ICT  Name:
0001_remove-bogus-plugin-externalinterface-return-value-check.patch  Size: 1kB
  By: nachanon
Patch to remove plugin's bogus in-band error check on ExternalInterface
callback return value
<http://savannah.gnu.org/patch/download.php?file_id=36313>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8909>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]