]> andersk Git - libyaml.git/commitdiff
Fixed segfault in yaml_string_write_handler.
authorKirill Simonov <xi@resolvent.net>
Sun, 5 Jun 2016 18:02:56 +0000 (13:02 -0500)
committerKirill Simonov <xi@resolvent.net>
Sun, 5 Jun 2016 18:02:56 +0000 (13:02 -0500)
CMakeLists.txt
configure.ac
src/api.c

index e84c28cd054cc959ebc706e9929955a4bf297cba..9bfe76185ee49dff8622a18e641b32d4c1a44c69 100644 (file)
@@ -5,7 +5,7 @@ project (yaml C)
 
 set (YAML_VERSION_MAJOR 0)
 set (YAML_VERSION_MINOR 1)
-set (YAML_VERSION_PATCH 6)
+set (YAML_VERSION_PATCH 7)
 set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERSION_PATCH}")
 
 file (GLOB SRC src/*.c)
index dd1aca05c71477e54f9b58df9ae19843ec37c28b..2f88f8a345566964de76cce16283a66d9786d453 100644 (file)
@@ -3,7 +3,7 @@
 # Define the package version numbers and the bug reporting link.
 m4_define([YAML_MAJOR], 0)
 m4_define([YAML_MINOR], 1)
-m4_define([YAML_PATCH], 6)
+m4_define([YAML_PATCH], 7)
 m4_define([YAML_BUGS], [http://pyyaml.org/newticket?component=libyaml])
 
 # Define the libtool version numbers; check the Autobook, Section 11.4.
@@ -19,7 +19,7 @@ m4_define([YAML_BUGS], [http://pyyaml.org/newticket?component=libyaml])
 #           YAML_AGE = 0
 m4_define([YAML_RELEASE], 0)
 m4_define([YAML_CURRENT], 2)
-m4_define([YAML_REVISION], 4)
+m4_define([YAML_REVISION], 5)
 m4_define([YAML_AGE], 0)
 
 # Initialize autoconf & automake.
index 0c4732e1520d227dfb537429c6b3e815b42865e3..b1a8da0bdadfa5c2736d457e1fba356bbff79e4f 100644 (file)
--- a/src/api.c
+++ b/src/api.c
@@ -415,7 +415,7 @@ yaml_string_write_handler(void *data, unsigned char *buffer, size_t size)
 {
     yaml_emitter_t *emitter = data;
 
-    if (emitter->output.string.size + *emitter->output.string.size_written
+    if (emitter->output.string.size - *emitter->output.string.size_written
             < size) {
         memcpy(emitter->output.string.buffer
                 + *emitter->output.string.size_written,
This page took 0.04025 seconds and 5 git commands to generate.