summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-03 17:29:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-03 17:29:36 +0000
commit704fbef5b620291e98e30010f75acac75874e7e5 (patch)
treeaaffa6bf0e0839cc89a4be2662ce5e7027510dde /array.c
parent3d2d405046f6f954235424500d828795b9a027b9 (diff)
* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
uninitialized array element. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07809] * array.c (rb_ary_fill): initialize local variables first. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 240760ef83..e886c2fa55 100644
--- a/array.c
+++ b/array.c
@@ -2223,7 +2223,7 @@ rb_ary_fill(argc, argv, ary)
VALUE ary;
{
VALUE item, arg1, arg2;
- long beg = 0, end, len;
+ long beg = 0, end = 0, len = 0;
VALUE *p, *pend;
int block_p = Qfalse;