summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/puny.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/puny.c b/src/puny.c
index 0ea9c29..4a4448b 100644
--- a/src/puny.c
+++ b/src/puny.c
@@ -100,6 +100,7 @@ main(int argc, const char **argv)
if (tok) *tok = '\0';
u_in = u8_to_u32(in, inlen + 1, NULL, &u_inlen);
+ if (!u_in) errx(1, "invalid utf8");
u_out = NULL;
if (encode) {