diff options
author | unknown <dean@mysql.com> | 2005-09-28 19:03:35 -0500 |
---|---|---|
committer | unknown <dean@mysql.com> | 2005-09-28 19:03:35 -0500 |
commit | c96665ce29bee15e763d47cc76e6f0286628a501 (patch) | |
tree | 5b04f49a483af3fb2f63bf367c3cd8737c5631b2 | |
parent | 68045dfd4bf4077d04ce50242bb7e3d1b9d31232 (diff) | |
download | mariadb-git-c96665ce29bee15e763d47cc76e6f0286628a501.tar.gz |
Fix for BUG#13582. Theoretically possible to try to overallocate RAM in some fulltext queries.
-rw-r--r-- | myisam/ft_nlq_search.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/myisam/ft_nlq_search.c b/myisam/ft_nlq_search.c index 7a506fd11c6..8460db61a36 100644 --- a/myisam/ft_nlq_search.c +++ b/myisam/ft_nlq_search.c @@ -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; |