summaryrefslogtreecommitdiff
path: root/ext/syck
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 /ext/syck
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 'ext/syck')
-rw-r--r--ext/syck/emitter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c
index f8d7b548a9..9c8ab8d49b 100644
--- a/ext/syck/emitter.c
+++ b/ext/syck/emitter.c
@@ -559,7 +559,7 @@ syck_scan_scalar( int req_width, char *cursor, long len )
}
if ( ( cursor[0] == '-' || cursor[0] == ':' ||
cursor[0] == '?' || cursor[0] == ',' ) &&
- ( cursor[1] == ' ' || cursor[1] == '\n' || len == 1 ) )
+ ( len == 1 || cursor[1] == ' ' || cursor[1] == '\n' ) )
{
flags |= SCAN_INDIC_S;
}