diff options
author | Kirill Simonov <xi@resolvent.net> | 2016-06-05 13:02:56 -0500 |
---|---|---|
committer | Kirill Simonov <xi@resolvent.net> | 2016-06-05 13:02:56 -0500 |
commit | 3af4d2be6f83f9620a1628dad08e30ea448d3d72 (patch) | |
tree | 729ec56a10f0d8472f249433786f374372c9d52c | |
parent | a7b9292e35dd77d70d66ded0d8e9b47ac8912cab (diff) | |
download | libyaml-hg-3af4d2be6f83f9620a1628dad08e30ea448d3d72.tar.gz |
Fixed segfault in yaml_string_write_handler.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/api.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e84c28c..9bfe761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/configure.ac b/configure.ac index dd1aca0..2f88f8a 100644 --- a/configure.ac +++ b/configure.ac @@ -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. @@ -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, |