summaryrefslogtreecommitdiff
path: root/src/ccl.c
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2018-02-08 17:47:37 -0800
committerManoj Srivastava <srivasta@debian.org>2018-02-08 17:47:37 -0800
commit04687c439c4e99abd0bc29506ceaa293a6330d9c (patch)
tree6499a0ecf7c445b8634fe436a0b04af4296bdce5 /src/ccl.c
parent7a39ce3d46f3d049ead08a455c5fcb1b37e153e3 (diff)
parentff7bc8af4680a6b16b07f8ddae8b5c64ad009de1 (diff)
Update to a new upstream commit for some bug fixes.
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
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;