Start work on ICU based regexp searches
[idzebra-moved-to-github.git] / index / kinput.c
index 4525b49..851c13e 100644 (file)
@@ -17,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 */
  
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <fcntl.h>
 #ifdef WIN32
 #include <io.h>
@@ -325,6 +328,8 @@ static void key_heap_insert(struct heap_info *hi, const char *buf, int nbytes,
 {
     int cur, parent;
 
+    assert(nbytes < INP_NAME_MAX);
+
     cur = ++(hi->heapnum);
     memcpy(hi->info.buf[hi->ptr[cur]], buf, nbytes);
     hi->info.file[hi->ptr[cur]] = kf;