ref: c6fc10168fccc31d8986abfbb7cd87eba5cc4a50
parent: c664c75f3317a331afa283e880b14935cf05d4a3
author: Ori Bernstein <[email protected]>
date: Thu Dec 19 07:21:10 EST 2013
Abort on overly long character constants.
--- a/parse/tok.c
+++ b/parse/tok.c
@@ -344,6 +344,8 @@
len = 3;
else if ((c & 0xf8) == 0xf0)
len = 4;
+ else
+ fatal(line, "Invalid utf8 encoded character constant");
val = c & ((1 << (8 - len)) - 1);
append(buf, buflen, sz, c);