hello, I found a potential bug of free of stack address in source code of mysql, the overview of occurrence is shown as follows.
step1:
in mysql/sql-common/client.c line 3585
defined a local variable tmp_mysql in this line
step2:
in mysql/sql-common/client.c line 3615
in a path derived from step1,there is a call of mysql_close and stack address of tmp_mysql is used as 1st parameter
step3:
in mysql/sql-common/client.c line 3823
the parameter of function mysql_close is used as 1st parameter of function my_free
step4:
in mysql/mysys/my_malloc.c line 134
free of stack address here
hello, I found a potential bug of free of stack address in source code of mysql, the overview of occurrence is shown as follows. step1: in mysql/sql-common/client.c line 3585 defined a local variable tmp_mysql in this line
step2: in mysql/sql-common/client.c line 3615 in a path derived from step1,there is a call of mysql_close and stack address of tmp_mysql is used as 1st parameter
step3: in mysql/sql-common/client.c line 3823 the parameter of function mysql_close is used as 1st parameter of function my_free
step4: in mysql/mysys/my_malloc.c line 134 free of stack address here