diff options
author | Andrew Azores <[email protected]> | 2013-10-24 10:11:37 -0400 |
---|---|---|
committer | Andrew Azores <[email protected]> | 2013-10-24 10:11:37 -0400 |
commit | 4d8cfe5bdb364fe3f4fca59c263dc1cdbd87e7e5 (patch) | |
tree | 7175edb5bf3e9941300560ebc3d8c3504312ef73 /tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js | |
parent | d124f6a22bbc74de7b95890642615cdf3eaa5029 (diff) |
Fix array index out of bounds due to malformed plugin message (PR539)
Failed calls to getString and getMember on JSObjects should not produce malformed
result strings. "null" is appended to result rather than empty string.
* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: (_getMember,
_getString) append "null" to result when call is unsuccessful
* tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.html:
new test to ensure failed calls to getMember and getString on JSObject do
not produce malformed results
* tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js:
same
* tests/reproducers/simple/JSObjectWithoutToString/srcs/JSObjectWithoutToString.java:
same
* tests/reproducers/simple/JSObjectWithoutToString/testcases/JSObjectWithoutToStringTest.java:
same
Diffstat (limited to 'tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js')
-rw-r--r-- | tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js b/tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js new file mode 100644 index 0000000..47d7d97 --- /dev/null +++ b/tests/reproducers/simple/JSObjectWithoutToString/resources/JSObjectWithoutToString.js @@ -0,0 +1,8 @@ +function doToStringTest(){ + var applet = document.getElementById('jswithouttostring'); + + var null_obj = Object.create(null); + + applet.callJSToString(null_obj); +} + |