aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/n3.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 34e7f83f..474f38f9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
serd (0.30.17) unstable; urgency=medium
* Fix crash when trying to read chunks without starting
+ * Fix hang when skipping an error at EOF when lax parsing
* Override pkg-config dependency within meson
* Test header for warnings more strictly
diff --git a/src/n3.c b/src/n3.c
index 2cbfb55a..cd6b6de6 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1685,7 +1685,7 @@ read_n3_statement(SerdReader* const reader)
static void
skip_until(SerdReader* const reader, const uint8_t byte)
{
- for (int c = 0; (c = peek_byte(reader)) && c != byte;) {
+ for (int c = 0; (c = peek_byte(reader)) && c != byte && c != EOF;) {
eat_byte_safe(reader, c);
}
}