YANG parser BUGFIX improve checking of input data when parsing
Despite the testcase is connected with special UTF8 character, it is
actually detected as unexpected end-of-input since the character starts
with a NULL-byte. In such a case libyang is not able to detect that
after the NULL-byte are still some data to read, it just interpret it as
end of input string.
Other, not-supported (by RFC) UTF8 characters should be detected
correctly with different error message.
Fixes #780
diff --git a/src/common.h b/src/common.h
index ae375a5..24cb523 100644
--- a/src/common.h
+++ b/src/common.h
@@ -175,7 +175,7 @@
#define LY_VCODE_INCHAR LYVE_SYNTAX, "Invalid character 0x%x."
#define LY_VCODE_INSTREXP LYVE_SYNTAX, "Invalid character sequence \"%.*s\", expected %s."
-#define LY_VCODE_EOF LYVE_SYNTAX, "Unexpected end-of-file."
+#define LY_VCODE_EOF LYVE_SYNTAX, "Unexpected end-of-input."
#define LY_VCODE_NTERM LYVE_SYNTAX, "%s not terminated."
#define LY_VCODE_NSUPP LYVE_SYNTAX, "%s not supported."
#define LY_VCODE_INSTMT LYVE_SYNTAX_YANG, "Invalid keyword \"%s\"."