Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c962d060
Commit
c962d060
authored
Feb 15, 2005
by
dean@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ft_nlq_search.c:
Added bounds check to avoid accessing unallocated FT_DOC array. (BUG #8522)
parent
c4ff2702
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
myisam/ft_nlq_search.c
myisam/ft_nlq_search.c
+6
-1
No files found.
BitKeeper/etc/logging_ok
View file @
c962d060
...
...
@@ -24,6 +24,7 @@ bk@admin.bk
brian@brian-akers-computer.local
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
dean@mysql.com
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
...
...
myisam/ft_nlq_search.c
View file @
c962d060
...
...
@@ -205,6 +205,10 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, byte *query,
left_root_right
))
goto
err2
;
/*
If ndocs == 0, this will not allocate RAM for FT_INFO.doc[],
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
),
MYF
(
0
));
...
...
@@ -275,7 +279,8 @@ float ft_nlq_find_relevance(FT_INFO *handler,
else
a
=
c
;
}
if
(
docs
[
a
].
dpos
==
docid
)
/* bounds check to avoid accessing unallocated handler->doc */
if
(
a
<
handler
->
ndocs
&&
docs
[
a
].
dpos
==
docid
)
return
(
float
)
docs
[
a
].
weight
;
else
return
0
.
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment