[Top][All Lists]

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

[Gnash-commit] [bug #47004] Gnash didn't pass string return value "Error

From: Nutchanon Wetchasit
Subject: [Gnash-commit] [bug #47004] Gnash didn't pass string return value "Error" and "SecurityError" from ExternalInterface callback
Date: Sun, 31 Jan 2016 02:49:38 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:25.5) Gecko/20150606 Firefox/31.9 PaleMoon/25.5.0

Follow-up Comment #1, bug #47004 (project gnash):

This problem could be narrowed down to `plugin/npapi/callbacks.cpp`, inside
function `remoteCallback()` around line 707

    std::string answer;
    GnashNPVariant parsed = plugin::ExternalInterface::parseXML(data);
    if (!NPVARIANT_IS_NULL(parsed.get())) {
        answer = NPStringToString(NPVARIANT_TO_STRING(parsed.get()));
    if (answer == "Error") {
    } else if (answer == "SecurityError") {
    } else {

This check doesn't seem appropriate, as:
* It fails when ActionScript's callback legitimately returned a string "Error"
or "SecurityError"; demonstrated by test file.
* Bad things could happen if the return value is both not `null` and is not a
String. (e.g. `NPObject`)

Second one is actually the reason I found this issue in the first place;
this string conversion code crashes when I tried to make
`ExternalInterface::parseXML()` return a full-blown `NPObject` derived
from JavaScript `Object` (a part of bug #32411's fix).

Gnash: Gnash 0.8.11dev (git e705394 29-Jan-2016) NPAPI
Browser: Iceweasel 10.0.12 
System: Debian GNU/Linux 7.0 Wheezy i386


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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