Commit c96665ce authored by unknown's avatar unknown
Browse files

Fix for BUG#13582. Theoretically possible to try to overallocate RAM in some fulltext queries.

parent 68045dfd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -266,7 +266,8 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, byte *query,
    so if ndocs == 0, FT_INFO.doc[] must not be accessed.
   */
  dlist=(FT_INFO *)my_malloc(sizeof(FT_INFO)+
			     sizeof(FT_DOC)*(aio.dtree.elements_in_tree-1),
			     sizeof(FT_DOC)*
			     (int)(aio.dtree.elements_in_tree-1),
			     MYF(0));
  if (!dlist)
    goto err;