From ddce701e6b25686861d54da155465851db27d7e0 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Mon, 14 Feb 2011 17:07:21 -0800 Subject: [PATCH] Bug 634136 - Add missing argc check to TypedArrayTemplate::create (r=dvander) --HG-- extra : rebase_source : 903586c7265f6a1b527fa3a1ebfaf3df6b789086 --- js/src/jstypedarray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jstypedarray.cpp b/js/src/jstypedarray.cpp index 273328e393a9..8d195f3bde23 100644 --- a/js/src/jstypedarray.cpp +++ b/js/src/jstypedarray.cpp @@ -768,7 +768,7 @@ class TypedArrayTemplate cx->destroy(tarray); return false; } - } else if (argv[0].isObject()) { + } else if (argc > 0 && argv[0].isObject()) { int32_t byteOffset = -1; int32_t length = -1;