deserializationbug339404.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. var lol = function() {
  6. var n = function() {}
  7. n(formatOutput());
  8. };
  9. function formatOutput() {
  10. var n = function() {}
  11. return n(/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/g, function() {
  12. });
  13. }
  14. var __counter = 0;
  15. __counter++;
  16. var protoObj0 = {};
  17. protoObj0.method1 = {
  18. init: function() {
  19. return function bar() {
  20. };
  21. }
  22. }.init();
  23. protoObj0.method1.prototype = {
  24. method1: function() {
  25. try {
  26. function v0() {
  27. var v1 = 1;
  28. Object.prototype.indexOf = String.prototype.indexOf;
  29. prop1 = {
  30. toString: function() {
  31. v1;
  32. }
  33. }.indexOf();
  34. [].push(v1);
  35. }
  36. v0();
  37. [
  38. {},
  39. new protoObj0.method1()
  40. ][__counter].method1();
  41. } catch(ex) {
  42. lol();
  43. } finally {
  44. }
  45. }
  46. };
  47. for(var _strvar22 in (new Int8Array(1))) {
  48. var n = function() {}
  49. var m = function() {}
  50. n(m(new protoObj0.method1().method1()));
  51. }
  52. WScript.Echo("PASS");