aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utf.c b/utf.c
index e399e99..b012184 100644
--- a/utf.c
+++ b/utf.c
@@ -51,6 +51,8 @@ utf8dec(const char *s, size_t n, uint_least32_t *c)
} else if ((b & 0xf8) == 0xf0) {
x = b & 0x07;
l = 4;
+ } else {
+ return -1;
}
if (n < l)
return -1;