--- lexer_v3-2.5.4.c	2006-11-18 18:46:05.000000000 -0500
+++ lexer_v3.c	2006-12-04 19:16:56.000000000 -0500
@@ -2435,6 +2435,14 @@
 	else
 		ret_val = EOB_ACT_CONTINUE_SCAN;
 
+	if (yy_n_chars + number_to_move > yy_current_buffer->yy_buf_size) {
+	    int new_size = yy_n_chars * 5 / 4 + 2;
+	    yy_current_buffer->yy_ch_buf = (char *)
+		/* Include room in for 2 EOB chars. */
+		yy_flex_realloc( (void *) yy_current_buffer->yy_ch_buf,
+				 new_size );
+	}
+
 	yy_n_chars += number_to_move;
 	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
 	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
