aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--README2
-rw-r--r--src/writer.c3
-rw-r--r--wscript2
4 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index a91a6a7a..5a8245c5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+serd (0.18.3) unstable;
+
+ * Fix possible crash in serd_writer_end_anon() when writing invalid lists
+
+ -- David Robillard <d@drobilla.net> Mon, 21 Jan 2013 22:03:07 -0500
+
serd (0.18.2) stable;
* Fix crash when serd_node_new_decimal is called with infinity or NaN
diff --git a/README b/README
index c828add1..4a5e6a31 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
Serd
-----
+====
Serd is a lightweight C library for RDF syntax which supports reading and
writing Turtle and NTriples.
diff --git a/src/writer.c b/src/writer.c
index c6f010c0..a9574d76 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -602,12 +602,11 @@ serd_writer_end_anon(SerdWriter* writer,
if (writer->syntax == SERD_NTRIPLES) {
return SERD_SUCCESS;
}
- if (serd_stack_is_empty(&writer->anon_stack)) {
+ if (serd_stack_is_empty(&writer->anon_stack) || writer->indent == 0) {
w_err(writer, SERD_ERR_UNKNOWN,
"unexpected end of anonymous node\n");
return SERD_ERR_UNKNOWN;
}
- assert(writer->indent > 0);
--writer->indent;
write_sep(writer, SEP_ANON_END);
reset_context(writer, true);
diff --git a/wscript b/wscript
index bb7fb0df..71b85c76 100644
--- a/wscript
+++ b/wscript
@@ -11,7 +11,7 @@ import waflib.extras.autowaf as autowaf
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-SERD_VERSION = '0.18.2'
+SERD_VERSION = '0.18.3'
SERD_MAJOR_VERSION = '0'
# Mandatory waf variables