aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-02-25 19:57:36 +0100
committerDavid Robillard <d@drobilla.net>2020-02-25 19:57:36 +0100
commit4a01a738a342567634127b83ea4999db7e57dbdf (patch)
tree856279d1606ba726dd08d5405f0d8fc8b63e6b69
parent2616fa277319022d8b37ee6d38e285b60c06d89d (diff)
downloadserd1.tar.gz
serd1.tar.bz2
serd1.zip
Emit reader errors on stack overflows in string literalsserd1
-rw-r--r--src/n3.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/n3.c b/src/n3.c
index 45933efe..730aed1d 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -339,6 +339,10 @@ read_STRING_LITERAL_LONG(SerdReader* reader, SerdNode* dest, uint8_t q)
}
}
+ if (st && reader->strict) {
+ r_err(reader, st, "failed to read literal (%s)\n", serd_strerror(st));
+ }
+
return (st && reader->strict) ? SERD_ERR_BAD_SYNTAX : st;
}
@@ -378,6 +382,10 @@ read_STRING_LITERAL(SerdReader* reader, SerdNode* dest, uint8_t q)
}
}
+ if (st && reader->strict) {
+ r_err(reader, st, "failed to read literal (%s)\n", serd_strerror(st));
+ }
+
return st;
}