Browse Source

Fix possible crash in serd_writer_end_anon() when writing invalid lists

git-svn-id: http://svn.drobilla.net/serd/trunk@409 490d8e77-9747-427b-9fa3-0b8f29cee8a0
zrythm_meson
David Robillard 10 years ago
parent
commit
4459a37f7d
  1. 6
      NEWS
  2. 2
      README
  3. 3
      src/writer.c
  4. 2
      wscript

6
NEWS

@ -1,3 +1,9 @@ @@ -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

2
README

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
Serd
----
====
Serd is a lightweight C library for RDF syntax which supports reading and
writing Turtle and NTriples.

3
src/writer.c

@ -602,12 +602,11 @@ serd_writer_end_anon(SerdWriter* writer, @@ -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);

2
wscript

@ -11,7 +11,7 @@ import waflib.extras.autowaf as autowaf @@ -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

Loading…
Cancel
Save