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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3504f70f
Commit
3504f70f
authored
Sep 11, 2021
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bison 3.7 - fix "conversion from 'ptrdiff_t' to 'ulong', possible loss of data"
parent
879e21b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
sql/sql_parse.cc
View file @
3504f70f
...
...
@@ -7226,10 +7226,10 @@ bool check_stack_overrun(THD *thd, long margin,
#define MY_YACC_INIT 1000 // Start with big alloc
#define MY_YACC_MAX 32000 // Because of 'short'
bool
my_yyoverflow
(
short
**
yyss
,
YYSTYPE
**
yyvs
,
ulong
*
yystacksize
)
bool
my_yyoverflow
(
short
**
yyss
,
YYSTYPE
**
yyvs
,
size_t
*
yystacksize
)
{
Yacc_state
*
state
=
&
current_thd
->
m_parser_state
->
m_yacc
;
ulong
old_info
=
0
;
size_t
old_info
=
0
;
DBUG_ASSERT
(
state
);
if
((
uint
)
*
yystacksize
>=
MY_YACC_MAX
)
return
1
;
...
...
sql/sql_yacc.yy
View file @
3504f70f
...
...
@@ -76,7 +76,7 @@ int yylex(void *yylval, void *yythd);
#define yyoverflow(A,B,C,D,E,F) \
{ \
ulong val= *(F);
\
size_t val= *(F);
\
if (my_yyoverflow((B), (D), &val)) \
{ \
yyerror(thd, (char*) (A)); \
...
...
@@ -1024,7 +1024,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
}
%{
bool my_yyoverflow(short **a, YYSTYPE **b,
ulong
*yystacksize);
bool my_yyoverflow(short **a, YYSTYPE **b,
size_t
*yystacksize);
%}
%pure-parser /* We have threads */
...
...
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