#17715 closed defect (fixed)
dojox/gfx/path#_updateWithSegment may produce a stack overflow with large path arrays
Reported by: | Mangala Sadhu Sangeet Singh Khalsa | Owned by: | Eric Durocher |
---|---|---|---|
Priority: | high | Milestone: | 1.7.6 |
Component: | DojoX GFX | Version: | 1.9.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Line 214 in path.js uses Array.prototype.push.apply to concatenate two arrays: Array.prototype.push.apply(this.shape.path, path);
If the "path" array is large this will cause a stack overflow: https://code.google.com/p/v8/issues/detail?id=2896 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply#Using_apply_and_built-in_functions
The attached patch file uses a for loop to push each element individually.
Attachments (1)
Change History (9)
Changed 7 years ago by
Attachment: | gfx-apply-overflow-patch-1.9.1.patch added |
---|
comment:1 Changed 7 years ago by
Component: | General → DojoX GFX |
---|---|
Milestone: | tbd → 1.9.3 |
Owner: | set to cjolif |
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 7 years ago by
Owner: | changed from cjolif to Eric Durocher |
---|
comment:4 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in Git commit: https://github.com/dojo/dojox/commit/67486ca03ed13a8827171c4dba0f5f77d0bd6f4c
comment:5 Changed 7 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Backport backport backport backport backport backport backport backport backport backport backport backport backport. How many more times do I need to drive this point home? I have talked about it on the mailing list, I have talked about it on commits, I have talked about it in the bug tracker. Please, BACKPORT FIXES WHEN YOU COMMIT THEM.
comment:6 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
done done done ;) in 1.9/8/7 (Thanks for the reminder.)
comment:8 Changed 7 years ago by
Milestone: | 1.9.3 → 1.7.6 |
---|
Thank mkgalsa,
The fix is trivial but I think it would be good if you had a Dojo CLA anyway. Do you have one (I can't find your nickname on the CLA listing)?
cf: http://dojofoundation.org/about/claForm