Bound the token readers: all their callers pass buffers of HTS_MAXBUFLEN
bytes (on the stack), but a longer token in a label or voice file was copied
in regardless.  Now the rest of such a token is skipped, and the reader warns
and returns FALSE.

Festival's bundled copy bounds three of the five readers, exit()ing on
overflow: https://github.com/festvox/festival/commit/4b138a9dc5

--- lib/HTS_misc.c
+++ lib/HTS_misc.c
@@ -330,6 +330,14 @@
    return fwrite(buf, size, n, fp);
 }
 
+/* HTS_token_too_long: a token did not fit into HTS_MAXBUFLEN */
+static HTS_Boolean HTS_token_too_long(const char *function, char *buff)
+{
+   buff[HTS_MAXBUFLEN - 1] = '\0';
+   HTS_error(0, "%s: Token too long: %.32s...\n", function, buff);
+   return FALSE;
+}
+
 /* HTS_get_pattern_token: get pattern token (single/double quote can be used) */
 HTS_Boolean HTS_get_pattern_token(HTS_File * fp, char *buff)
 {
@@ -368,7 +376,9 @@
 
    i = 0;
    while (1) {
-      buff[i++] = c;
+      if (i < HTS_MAXBUFLEN)
+         buff[i] = c;
+      i++;
       c = HTS_fgetc(fp);
       if (squote && c == '\'')
          break;
@@ -384,6 +394,8 @@
       }
    }
 
+   if (i >= HTS_MAXBUFLEN)
+      return HTS_token_too_long("HTS_get_pattern_token", buff);
    buff[i] = '\0';
    return TRUE;
 }
@@ -406,7 +418,9 @@
    }
 
    for (i = 0; c != ' ' && c != '\n' && c != '\t';) {
-      buff[i++] = c;
+      if (i < HTS_MAXBUFLEN)
+         buff[i] = c;
+      i++;
       if (HTS_feof(fp))
          break;
       c = HTS_fgetc(fp);
@@ -414,6 +428,8 @@
          break;
    }
 
+   if (i >= HTS_MAXBUFLEN)
+      return HTS_token_too_long("HTS_get_token_from_fp", buff);
    buff[i] = '\0';
    return TRUE;
 }
@@ -436,7 +452,9 @@
    }
 
    for (i = 0; c != separator;) {
-      buff[i++] = c;
+      if (i < HTS_MAXBUFLEN)
+         buff[i] = c;
+      i++;
       if (HTS_feof(fp))
          break;
       c = HTS_fgetc(fp);
@@ -444,6 +462,8 @@
          break;
    }
 
+   if (i >= HTS_MAXBUFLEN)
+      return HTS_token_too_long("HTS_get_token_from_fp_with_separator", buff);
    buff[i] = '\0';
    return TRUE;
 }
@@ -466,10 +486,13 @@
       c = string[(*index)++];
    }
    for (i = 0; c != ' ' && c != '\n' && c != '\t' && c != '\0'; i++) {
-      buff[i] = c;
+      if (i < HTS_MAXBUFLEN)
+         buff[i] = c;
       c = string[(*index)++];
    }
 
+   if (i >= HTS_MAXBUFLEN)
+      return HTS_token_too_long("HTS_get_token_from_string", buff);
    buff[i] = '\0';
    return TRUE;
 }
@@ -493,13 +516,17 @@
       c = str[(*index)];
    }
    while (c != separator && c != '\0') {
-      buff[len++] = c;
+      if (len < HTS_MAXBUFLEN)
+         buff[len] = c;
+      len++;
       (*index)++;
       c = str[(*index)];
    }
    if (c != '\0')
       (*index)++;
 
+   if (len >= HTS_MAXBUFLEN)
+      return HTS_token_too_long("HTS_get_token_from_string_with_separator", buff);
    buff[len] = '\0';
 
    if (len > 0)
