summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-02 14:59:06 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-02 14:59:06 +0000
commit2debdd1063bcf46190ad263e4e73794e975285c7 (patch)
tree3fcad0017446da6c8a499f504178635690ba5752
parent737ef3f4a309638ba911d4599c811582460b7e9f (diff)
* ext/syck/emitter.c (syck_emitter_write): should not set '\0' on
emitter's marker. if marker points to the end of buffer, this causes buffer overrun. (ex: YAML.dump("." * 12288)) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/syck/emitter.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dfc6015..d5b31a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Feb 2 23:51:18 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
+
+ * ext/syck/emitter.c (syck_emitter_write): should not set '\0' on
+ emitter's marker. if marker points to the end of buffer, this causes
+ buffer overrun. (ex: YAML.dump("." * 12288))
+
Thu Feb 2 16:01:24 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (eval): need not to protect $SAFE value.
diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c
index 9fe699f..f8d7b54 100644
--- a/ext/syck/emitter.c
+++ b/ext/syck/emitter.c
@@ -314,7 +314,6 @@ syck_emitter_write( SyckEmitter *e, char *str, long len )
*/
S_MEMCPY( e->marker, str, char, len );
e->marker += len;
- e->marker[0] = '\0';
}
/*