Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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)

gfx-apply-overflow-patch-1.9.1.patch (563 bytes) - added by Mangala Sadhu Sangeet Singh Khalsa 5 years ago.

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by Mangala Sadhu Sangeet Singh Khalsa

comment:1 Changed 5 years ago by Bryan Forbes

Component: GeneralDojoX GFX
Milestone: tbd1.9.3
Owner: set to cjolif
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 5 years ago by cjolif

Owner: changed from cjolif to Eric Durocher

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

comment:3 Changed 5 years ago by Bryan Forbes

His contribution is covered by SitePen?'s CCLA.

comment:4 Changed 5 years ago by Eric Durocher

Resolution: fixed
Status: assignedclosed

comment:5 Changed 5 years ago by Colin Snover

Resolution: fixed
Status: closedreopened

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 5 years ago by Eric Durocher

Resolution: fixed
Status: reopenedclosed

done done done ;) in 1.9/8/7 (Thanks for the reminder.)

comment:7 Changed 5 years ago by Colin Snover

Thank you!!

comment:8 Changed 5 years ago by Colin Snover

Milestone: 1.9.31.7.6
Note: See TracTickets for help on using tickets.