diff options
author | David Robillard <d@drobilla.net> | 2019-03-10 16:21:36 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:04 +0200 |
commit | 42e4a4f5ab9ed3376096251cea46bcf49621faa2 (patch) | |
tree | 5bd119566c688935120092188e2eb6ca234e8400 /src | |
parent | 14c2faeed5d835450cbc081e32d60e22186c3766 (diff) | |
download | serd-42e4a4f5ab9ed3376096251cea46bcf49621faa2.tar.gz serd-42e4a4f5ab9ed3376096251cea46bcf49621faa2.tar.bz2 serd-42e4a4f5ab9ed3376096251cea46bcf49621faa2.zip |
Strengthen writer statement preconditions
Diffstat (limited to 'src')
-rw-r--r-- | src/writer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c index 8f155743..cf86b32e 100644 --- a/src/writer.c +++ b/src/writer.c @@ -755,7 +755,9 @@ serd_writer_write_statement(SerdWriter* writer, const SerdNode* const object = serd_statement_get_object(statement); const SerdNode* const graph = serd_statement_get_graph(statement); - if (!is_resource(subject) || !is_resource(predicate) || !object) { + if (!is_resource(subject) || !is_resource(predicate) || !object || + ((flags & SERD_ANON_S) && (flags & SERD_LIST_S)) || + ((flags & SERD_ANON_O) && (flags & SERD_LIST_O))) { return SERD_ERR_BAD_ARG; } |