[macruby-changes] [3209] MacRuby/trunk/lib/rss/utils.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jan 7 21:27:49 PST 2010
Revision: 3209
http://trac.macosforge.org/projects/ruby/changeset/3209
Author: lsansonetti at apple.com
Date: 2010-01-07 21:27:46 -0800 (Thu, 07 Jan 2010)
Log Message:
-----------
temporary fix for potential #caller out of bounds access
Modified Paths:
--------------
MacRuby/trunk/lib/rss/utils.rb
Modified: MacRuby/trunk/lib/rss/utils.rb
===================================================================
--- MacRuby/trunk/lib/rss/utils.rb 2010-01-08 04:45:43 UTC (rev 3208)
+++ MacRuby/trunk/lib/rss/utils.rb 2010-01-08 05:27:46 UTC (rev 3209)
@@ -10,7 +10,9 @@
end
def get_file_and_line_from_caller(i=0)
- file, line, = caller[i].split(':')
+ bt = caller
+ i = bt.size - 1 if i >= bt.size
+ file, line, = bt[i].split(':')
line = line.to_i
line += 1 if i.zero?
[file, line]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100107/e1c0be86/attachment.html>
More information about the macruby-changes
mailing list