Skip to content

A potential bug of free of stack address #13

@ash1852

Description

@ash1852

hello, I found a potential bug of free of stack address in source code of mysql, the overview of occurrence is shown as follows.
image
image
step1:
in mysql/sql-common/client.c line 3585
defined a local variable tmp_mysql in this line
image

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
image

step3:
in mysql/sql-common/client.c line 3823
the parameter of function mysql_close is used as 1st parameter of function my_free
image

step4:
in mysql/mysys/my_malloc.c line 134
free of stack address here
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions