Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum call stack exceeded #90

Open
GoogleCodeExporter opened this issue Sep 11, 2015 · 3 comments
Open

Maximum call stack exceeded #90

GoogleCodeExporter opened this issue Sep 11, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use CryptoJS to compute an MD5 inside a web worker with particular file sizes

What is the expected output? What do you see instead?
I expected to get an MD5, but instead got a maximum call stack exceeded error.

What version of the product are you using? On what operating system?
3.1.2 on chrome linux.

Please provide any additional information below.

Here is a patch which fixes it. For some reason this only happens in a web 
worker, perhaps the limits to fn.apply are less in the web worker environment?..

Index: core.js
===================================================================
--- core.js (revision 664)
+++ core.js (working copy)
@@ -217,7 +217,9 @@
                 }
             } else {
                 // Copy all words at once
-                thisWords.push.apply(thisWords, thatWords);
+                for (var i = 0; i < thatWords.length) {
+                  thisWords.push(thatWords[i]);
+                }
             }
             this.sigBytes += thatSigBytes;




Original issue reported on code.google.com by e...@dnanexus.com on 9 Jul 2013 at 8:52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant