summaryrefslogtreecommitdiff
path: root/src/ccl.c
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2018-08-06 12:40:25 -0700
committerNiels Thykier <niels@thykier.net>2018-08-06 12:40:25 -0700
commita180cb6af61aec3423a856afec59248ef132a88e (patch)
tree8f3145e074fb78f1f753ab8a91829599ae3f357f /src/ccl.c
parent2a70951b3ee5ae119749f79458df981134b248cd (diff)
flex (2.6.4-6.2) unstable; urgency=medium
* Non-maintainer upload. [ Ruben Undheim ] * debian/rules: - Fix build with "dpkg-buildpackage -A" by checking if directory exists first (Closes: #898725) [ Niels Thykier ] * debian/control: - Set Rules-Requires-Root (R³) to no as flex does not need/require (fake)root during package build. [dgit import package flex 2.6.4-6.2]
Diffstat (limited to 'src/ccl.c')
-rw-r--r--src/ccl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ccl.c b/src/ccl.c
index ff9a213..5c5af13 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -73,6 +73,13 @@ void ccladd (int cclp, int ch)
newpos = ind + len;
+ /* For a non-last cclp, expanding the set will overflow and overwrite a
+ * char in the next cclp.
+ * FIXME: Need another allocation scheme for ccl's. */
+ if (cclp != lastccl) {
+ flexfatal(_("internal error: trying to add a char to a non-last ccl.\n"));
+ }
+
if (newpos >= current_max_ccl_tbl_size) {
current_max_ccl_tbl_size += MAX_CCL_TBL_SIZE_INCREMENT;