diff --git a/ChangeLog b/ChangeLog index dc2c953990..7bdf9eee63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 9 21:17:50 2008 Yusuke Endoh + + * ext/syck/syck.c (syck_lookup_sym): remove reading uninitialized + variable. + Thu Oct 9 16:34:15 2008 NARUSE, Yui * ext/json/ext/generator/extconf.rb: fix target. diff --git a/ext/syck/syck.c b/ext/syck/syck.c index 92b7566d1a..e0fc2bc244 100644 --- a/ext/syck/syck.c +++ b/ext/syck/syck.c @@ -192,11 +192,11 @@ syck_add_sym( SyckParser *p, void *data ) int syck_lookup_sym( SyckParser *p, SYMID id, void **datap ) { - st_data_t data = (st_data_t)*datap; + st_data_t data; int ret; if ( p->syms == NULL ) return 0; ret = st_lookup( p->syms, id, &data ); - *datap = (void *)data; + if(ret) *datap = (void *)data; return ret; }