From e4b6c6595f7c7ddc069b642577ef110b8a1e525d Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 3 May 2006 17:29:36 +0000 Subject: * ext/syck/emitter.c (syck_scan_scalar): avoid accessing uninitialized array element. a patch from Pat Eyler . [ruby-core:07809] * array.c (rb_ary_fill): initialize local variables first. a patch from Pat Eyler . [ruby-core:07810] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/syck/emitter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c index f8d7b548a..9c8ab8d49 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; } -- cgit