diff --git a/src/ly_common.c b/src/ly_common.c index 88aeba9f1..f1ed08e68 100644 --- a/src/ly_common.c +++ b/src/ly_common.c @@ -1386,7 +1386,7 @@ ly_getutf8(const char **input, uint32_t *utf8_char, uint32_t *bytes_read) c = (c << 6) | (aux & 0x3f); } - if ((c < 0x1000) || (c > 0x10ffff)) { + if ((c < 0x10000) || (c > 0x10ffff)) { goto error; } } else { diff --git a/tests/utests/types/string.c b/tests/utests/types/string.c index 50c0199b9..3fcde6529 100644 --- a/tests/utests/types/string.c +++ b/tests/utests/types/string.c @@ -742,6 +742,11 @@ test_data_xml(void **state) CHECK_LOG_CTX("Entity reference \"&text;